proj home

Files   Classes   Functions   Hierarchy  

prob_f002 Class Reference

#include <prob_func.h>

Inheritance diagram for prob_f002:
Collaboration diagram for prob_f002:

List of all members.

Public Member Functions

 prob_f002 ()
 Initialize memory for xi.
doublec operator() ()
 (x0-1)^2+(x1-2)^2+(x2-5)^2


Detailed Description

Definition at line 17 of file prob_func.h.


Constructor & Destructor Documentation

prob_f002::prob_f002 (  )  [inline]

Initialize memory for xi.

Definition at line 22 of file prob_func.h.

00022 : funcstate<double>(3) {}


Member Function Documentation

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 }


The documentation for this class was generated from the following files:

Generated on Fri Mar 4 00:50:11 2011 for Chelton Evans Source by  doxygen 1.5.8