Files Classes Functions Hierarchy
#include <prob_func.h>
Public Member Functions | |
| prob_f002 () | |
| Initialize memory for xi. | |
| doublec | operator() () |
| (x0-1)^2+(x1-2)^2+(x2-5)^2 | |
Definition at line 17 of file prob_func.h.
| prob_f002::prob_f002 | ( | ) | [inline] |
Initialize memory for xi.
Definition at line 22 of file prob_func.h.
00022 : funcstate<double>(3) {}
| doublec prob_f002::operator() | ( | ) | [virtual] |
(x0-1)^2+(x1-2)^2+(x2-5)^2
Implements funcstate< double >.
Definition at line 13 of file prob_func.cpp.
References funcstate< double >::counter, and funcstate< double >::xi.
00014 { 00015 ++counter; 00016 00017 double a = xi[0]-1.0; 00018 double b = xi[1]-2.0; 00019 double c = xi[2]-5.0; 00020 xi[3] = a*a+b*b+c*c; 00021 return xi[3]; 00022 }
1.5.8