Files Classes Functions Hierarchy
#include <powell03.h>
Public Member Functions | |
| powell03 (LNM opt_) | |
| ~powell03 () | |
| void | dirUnitVectors () |
| Reset the direction vectors to be perpendicular unit vectors. | |
Public Attributes | |
| LNM | opt |
| uint | optiterations |
| The number of iterations for one minimization. | |
| uintc | dim |
| T * | memoryblock |
| T * | pos |
| Positions. | |
| T * | dir |
| Direction vectors. | |
| T * | xi |
| function state | |
| uintc | dir_current |
| The start of the direction stack. | |
| T ** | linepathx0 |
| T ** | linepathdi |
Protected Member Functions | |
| void | minimize (uintc k) |
| The k'th line is minimized with the new state in xi. | |
Definition at line 10 of file powell03.h.
Definition at line 38 of file powell03.h.
References powell03< LNM, T >::dim, powell03< LNM, T >::dir, powell03< LNM, T >::linepathdi, powell03< LNM, T >::linepathx0, powell03< LNM, T >::memoryblock, powell03< LNM, T >::opt, powell03< LNM, T >::pos, and powell03< LNM, T >::xi.
00039 : opt(opt_), optiterations(10), dim(opt.linepath.dim) 00040 { 00041 memoryblock = new T[dim*dim*2 + dim*2]; 00042 uint memi=0; 00043 pos = & memoryblock[memi]; 00044 memi += dim*dim; 00045 dir = & memoryblock[memi]; 00046 memi += dim*dim; 00047 xi = & memoryblock[memi]; 00048 memi += dim; 00049 u0 = & memoryblock[memi]; 00050 memi += dim; 00051 00052 opt.linepath.xi = xi; 00053 linepathx0 = & opt.linepath.xo; 00054 linepathdi = & opt.linepath.di; 00055 }
Definition at line 57 of file powell03.h.
References powell03< LNM, T >::memoryblock.
00058 { delete[] memoryblock; }
Reset the direction vectors to be perpendicular unit vectors.
Definition at line 81 of file powell03.h.
References powell03< LNM, T >::dim, and powell03< LNM, T >::dir.
00082 { 00083 for (uint i=0; i<dim*dim; ++i) 00084 dir[i]=0; 00085 for (uint i=0; i<dim; ++i) 00086 dir[i*N+i]=(T)1; 00087 }
| void powell03< LNM, T >::minimize | ( | uintc | k | ) | [inline, protected] |
The k'th line is minimized with the new state in xi.
Definition at line 66 of file powell03.h.
References powell03< LNM, T >::dim, powell03< LNM, T >::dir, powell03< LNM, T >::dir_current, powell03< LNM, T >::linepathx0, powell03< LNM, T >::opt, powell03< LNM, T >::optiterations, and powell03< LNM, T >::pos.
00067 { 00068 *linepathx0 = pos+dim*k; 00069 uintc k2 = (dir_current + k ) % dim; 00070 *linepathd1 = dir+dim*k2; 00071 00072 opt.reset(0.0,5.0); 00073 for (uint i=0; i<optiterations; ++i) 00074 ++opt; 00075 }
Definition at line 18 of file powell03.h.
Referenced by powell03< LNM, T >::dirUnitVectors(), powell03< LNM, T >::minimize(), and powell03< LNM, T >::powell03().
Direction vectors.
Definition at line 25 of file powell03.h.
Referenced by powell03< LNM, T >::dirUnitVectors(), powell03< LNM, T >::minimize(), and powell03< LNM, T >::powell03().
| uintc powell03< LNM, T >::dir_current |
The start of the direction stack.
Definition at line 30 of file powell03.h.
Referenced by powell03< LNM, T >::minimize().
| T** powell03< LNM, T >::linepathdi |
| T** powell03< LNM, T >::linepathx0 |
Definition at line 32 of file powell03.h.
Referenced by powell03< LNM, T >::minimize(), and powell03< LNM, T >::powell03().
| T* powell03< LNM, T >::memoryblock |
Definition at line 20 of file powell03.h.
Referenced by powell03< LNM, T >::powell03(), and powell03< LNM, T >::~powell03().
Definition at line 14 of file powell03.h.
Referenced by powell03< LNM, T >::minimize(), and powell03< LNM, T >::powell03().
| uint powell03< LNM, T >::optiterations |
The number of iterations for one minimization.
O(fn) multiplier.
Definition at line 16 of file powell03.h.
Referenced by powell03< LNM, T >::minimize().
Positions.
Definition at line 23 of file powell03.h.
Referenced by powell03< LNM, T >::minimize(), and powell03< LNM, T >::powell03().
function state
Definition at line 27 of file powell03.h.
Referenced by powell03< LNM, T >::powell03().
1.5.8