GClasses
GClasses::OptimizerTargetFunc Class Reference

#include <GLearnerLib.h>

Inheritance diagram for GClasses::OptimizerTargetFunc:
GClasses::GTargetFunction

Public Member Functions

 OptimizerTargetFunc (GMatrix *pIn, GMatrix *pOut, GFunction *pFunc, GFunctionParser *pParser)
 
virtual ~OptimizerTargetFunc ()
 
virtual double computeError (const GVec &pVector)
 Computes the error of the given vector using all patterns. More...
 
virtual void initVector (GVec &pVector)
 Sets pVector to an initial guess. The default behavior is to initialize the vector to all zeros. You should override this method if different behavior is desired. More...
 
virtual bool isConstrained ()
 
virtual bool isStable ()
 This method should return true if computeError is deterministic with respect to the vector being optimized. It should return false if the error depends on some state other than the vector being optimized. This mostly affects whether the optimization algorithms are permitted to remember old error values for efficiency purposes. Stable is assumed, so you should override this method if your target function is not stable. More...
 
- Public Member Functions inherited from GClasses::GTargetFunction
 GTargetFunction (GRelation *pRelation)
 Takes ownership of pRelation. More...
 
 GTargetFunction (size_t dims)
 
virtual ~GTargetFunction ()
 
GRelationrelation ()
 Returns a (smart) pointer to the relation, which specifies the type (discrete or real) of each element in the vector that is being optimized. More...
 

Public Attributes

GFunctionm_pFunc
 
GMatrixm_pIn
 
GMatrixm_pOut
 
GFunctionParserm_pParser
 

Additional Inherited Members

- Protected Attributes inherited from GClasses::GTargetFunction
GRelationm_pRelation
 

Constructor & Destructor Documentation

GClasses::OptimizerTargetFunc::OptimizerTargetFunc ( GMatrix pIn,
GMatrix pOut,
GFunction pFunc,
GFunctionParser pParser 
)
inline
virtual GClasses::OptimizerTargetFunc::~OptimizerTargetFunc ( )
inlinevirtual

Member Function Documentation

virtual double GClasses::OptimizerTargetFunc::computeError ( const GVec vector)
inlinevirtual

Computes the error of the given vector using all patterns.

Implements GClasses::GTargetFunction.

virtual void GClasses::OptimizerTargetFunc::initVector ( GVec vector)
inlinevirtual

Sets pVector to an initial guess. The default behavior is to initialize the vector to all zeros. You should override this method if different behavior is desired.

Reimplemented from GClasses::GTargetFunction.

virtual bool GClasses::OptimizerTargetFunc::isConstrained ( )
inlinevirtual
virtual bool GClasses::OptimizerTargetFunc::isStable ( )
inlinevirtual

This method should return true if computeError is deterministic with respect to the vector being optimized. It should return false if the error depends on some state other than the vector being optimized. This mostly affects whether the optimization algorithms are permitted to remember old error values for efficiency purposes. Stable is assumed, so you should override this method if your target function is not stable.

Reimplemented from GClasses::GTargetFunction.

Member Data Documentation

GFunction* GClasses::OptimizerTargetFunc::m_pFunc
GMatrix* GClasses::OptimizerTargetFunc::m_pIn
GMatrix* GClasses::OptimizerTargetFunc::m_pOut
GFunctionParser* GClasses::OptimizerTargetFunc::m_pParser