Files Classes Functions Hierarchy
#include <probsysequ01.h>
Public Member Functions | |
| probsysequ01 () | |
| ~probsysequ01 () | |
| void | operator() (double &fval) |
| Evaluate the function to be minimized. | |
| void | partialderivative (double &val, uintc i, double const h) |
| Numerically evaluate the partial derivative. | |
Public Attributes | |
| uint | counter |
| Counts the number of times the function is evaluated. | |
| double * | xi |
Solve a 2D non linear simultaneous equation.
Definition at line 13 of file probsysequ01.h.
| probsysequ01::probsysequ01 | ( | ) | [inline] |
| probsysequ01::~probsysequ01 | ( | ) | [inline] |
| void probsysequ01::operator() | ( | double & | fval | ) | [inline] |
Evaluate the function to be minimized.
Definition at line 29 of file probsysequ01.h.
Referenced by partialderivative().
00032 { 00033 double t0 = xi[0]-0.1136*(xi[0]+3.0*xi[1])*(1.0-xi[0]); 00034 double t1 = xi[1]+7.5*(2.0*xi[0]-xi[1])*(1.0-xi[1]); 00035 fval = t0*t0 + t1*t1; 00036 //cout << SHOW(fval) << endl; 00037 ++counter; 00038 }
| void probsysequ01::partialderivative | ( | double & | val, | |
| uintc | i, | |||
| double const | h | |||
| ) | [inline] |
Numerically evaluate the partial derivative.
Definition at line 42 of file probsysequ01.h.
References operator()(), and xi.
Referenced by exploretest03().
00047 { 00048 assert(i<2); 00049 static double x2[2]; 00050 00051 //Save initial value. 00052 x2[i] = xi[i]; 00053 00054 xi[i] -= h*0.5; 00055 double f0; 00056 operator()(f0); 00057 00058 double f1; 00059 xi[i] += h; 00060 operator()(f1); 00061 00062 val = (f1-f0)/h; 00063 00064 // Restore initial value. 00065 xi[i] = x2[i]; 00066 };
Counts the number of times the function is evaluated.
Definition at line 18 of file probsysequ01.h.
Referenced by explorepdtest02(), exploretest03(), minimizecomparetest01(), minimizecomparetest02(), operator()(), partialderivativetest01(), and test11().
| double* probsysequ01::xi |
Definition at line 20 of file probsysequ01.h.
Referenced by operator()(), partialderivative(), and ~probsysequ01().
1.5.8