Files Classes Functions Hierarchy
#include <linepath_d1.h>
Public Member Functions | |
| linepath_d1 (uintc dim_, typename typeop< FN >::Tref fn_, XI xi_, X x0_, X di_) | |
| void | eval (T const t) |
| Set xi by t. | |
| void | eval (T &fval, T const t) |
| Evaluate the function on the line at t. | |
| ostream & | print (ostream &os) const |
| Evaluate the function. | |
Public Attributes | |
| uintc | dim |
| Dimension. | |
| typeop< FN >::Tref | fn |
| The function being minimized. | |
| XI | xi |
| The function state. | |
| X | x0 |
| Line constant. | |
| X | di |
| Direction. | |
The function has been templated as FN. The function state has been templated as XI. The initial position and direction templated with X type.
While XI and X are both N dimensional vectors with elements of the same type they are different types to support complex functions fn. For most applications this generality will not be needed.
Definition at line 23 of file linepath_d1.h.
| linepath_d1< FN, XI, X, T >::linepath_d1 | ( | uintc | dim_, | |
| typename typeop< FN >::Tref | fn_, | |||
| XI | xi_, | |||
| X | x0_, | |||
| X | di_ | |||
| ) | [inline] |
| void linepath_d1< FN, XI, X, T >::eval | ( | T & | fval, | |
| T const | t | |||
| ) | [inline] |
Evaluate the function on the line at t.
Definition at line 57 of file linepath_d1.h.
References linepath_d1< FN, XI, X, T >::eval(), and linepath_d1< FN, XI, X, T >::fn.
Referenced by linepath_d1< FN, XI, X, T >::eval().
| void linepath_d1< FN, XI, X, T >::eval | ( | T const | t | ) | [inline] |
Set xi by t.
Definition at line 49 of file linepath_d1.h.
References linepath_d1< FN, XI, X, T >::di, linepath_d1< FN, XI, X, T >::dim, linepath_d1< FN, XI, X, T >::x0, and linepath_d1< FN, XI, X, T >::xi.
00050 { 00051 for (uint i=0; i<dim; ++i) 00052 xi[i] = x0[i]+di[i]*t; 00053 //cout << "***"; 00054 //cout << printvecfunc(xi,dim) << endl; 00055 }
| ostream & linepath_d1< FN, XI, X, T >::print | ( | ostream & | os | ) | const [inline] |
Evaluate the function.
Look at the current state.
Definition at line 74 of file linepath_d1.h.
References linepath_d1< FN, XI, X, T >::di, linepath_d1< FN, XI, X, T >::dim, printvecfunc(), linepath_d1< FN, XI, X, T >::x0, and linepath_d1< FN, XI, X, T >::xi.
00075 { 00076 os << "dim=" << dim << endl; 00077 os << "xi[]=" << printvecfunc(xi,dim) << endl; 00078 os << "x0[]=" << printvecfunc(x0,dim) << endl; 00079 os << "di[]=" << printvecfunc(di,dim) << endl; 00080 00081 return os; 00082 }
| X linepath_d1< FN, XI, X, T >::di |
Direction.
Definition at line 37 of file linepath_d1.h.
Referenced by linepath_d1< FN, XI, X, T >::eval(), and linepath_d1< FN, XI, X, T >::print().
| uintc linepath_d1< FN, XI, X, T >::dim |
Dimension.
Definition at line 28 of file linepath_d1.h.
Referenced by linepath_d1< FN, XI, X, T >::eval(), and linepath_d1< FN, XI, X, T >::print().
| typeop<FN>::Tref linepath_d1< FN, XI, X, T >::fn |
The function being minimized.
Definition at line 31 of file linepath_d1.h.
Referenced by linepath_d1< FN, XI, X, T >::eval().
| X linepath_d1< FN, XI, X, T >::x0 |
Line constant.
Definition at line 35 of file linepath_d1.h.
Referenced by linepath_d1< FN, XI, X, T >::eval(), and linepath_d1< FN, XI, X, T >::print().
| XI linepath_d1< FN, XI, X, T >::xi |
The function state.
Definition at line 33 of file linepath_d1.h.
Referenced by linepath_d1< FN, XI, X, T >::eval(), and linepath_d1< FN, XI, X, T >::print().
1.5.8