00001 #ifndef __AbsFObjectiveFn_H__ 00002 #define __AbsFObjectiveFn_H__ 00003 00004 00027 #include "FloatVector.hpp" 00028 #include "AFSymMatrix.hpp" 00029 00030 class AbsFObjectiveFn 00031 { 00032 public: 00033 virtual ~AbsFObjectiveFn(){} 00034 00035 virtual double f(FloatVector* x)=0; // function 00036 virtual FloatVector* firstDeriv(FloatVector* x, FloatVector* dest=0)=0; // first derivation 00037 00038 virtual AFSymMatrix* hessianDiag(FloatVector* x, AFSymMatrix* dest=0)=0; // approximated Hessian 00039 00040 virtual AFSymMatrix* hessian(FloatVector* x, AFSymMatrix* dest=0)=0; // Hessian 00041 00042 // used for testing 00043 virtual FloatVector* startPoint()=0; 00044 virtual FloatVector* solutionPoint()=0; 00045 }; 00046 00047 #endif 00048