GClasses
|
The optimizer seeks to find values that minimize this target function. More...
#include <GOptimizer.h>
Public Member Functions | |
GTargetFunction (sp_relation &pRelation) | |
GTargetFunction (size_t dims) | |
virtual | ~GTargetFunction () |
sp_relation & | relation () |
Returns a (smart) pointer to the relation, which specifies the type (discrete or real) of each element in the vector that is being optimized. | |
virtual bool | isStable ()=0 |
Return true if computeError is completely deterministic with respect to the vector being optimized. Return false if the error also 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. | |
virtual bool | isConstrained ()=0 |
Return true if this function is constrained to only support certain vectors. | |
virtual void | initVector (double *pVector)=0 |
Sets pVector to an initial guess. | |
virtual double | computeError (const double *pVector)=0 |
Computes the error of the given vector using all patterns. | |
virtual double | computeErrorOnline (const double *pVector, size_t nPattern) |
Estimates the error of the given vector using a single (usually randomly selected) pattern. | |
virtual void | constrain (double *pVector) |
Adjust pVector to the nearest vector that fits the constraints. | |
Protected Attributes | |
sp_relation | m_pRelation |
The optimizer seeks to find values that minimize this target function.
GClasses::GTargetFunction::GTargetFunction | ( | sp_relation & | pRelation | ) | [inline] |
GClasses::GTargetFunction::GTargetFunction | ( | size_t | dims | ) |
virtual GClasses::GTargetFunction::~GTargetFunction | ( | ) | [inline, virtual] |
virtual double GClasses::GTargetFunction::computeError | ( | const double * | pVector | ) | [pure virtual] |
Computes the error of the given vector using all patterns.
virtual double GClasses::GTargetFunction::computeErrorOnline | ( | const double * | pVector, |
size_t | nPattern | ||
) | [inline, virtual] |
Estimates the error of the given vector using a single (usually randomly selected) pattern.
virtual void GClasses::GTargetFunction::constrain | ( | double * | pVector | ) | [inline, virtual] |
Adjust pVector to the nearest vector that fits the constraints.
virtual void GClasses::GTargetFunction::initVector | ( | double * | pVector | ) | [pure virtual] |
Sets pVector to an initial guess.
virtual bool GClasses::GTargetFunction::isConstrained | ( | ) | [pure virtual] |
Return true if this function is constrained to only support certain vectors.
virtual bool GClasses::GTargetFunction::isStable | ( | ) | [pure virtual] |
Return true if computeError is completely deterministic with respect to the vector being optimized. Return false if the error also 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.
sp_relation& GClasses::GTargetFunction::relation | ( | ) | [inline] |
Returns a (smart) pointer to the relation, which specifies the type (discrete or real) of each element in the vector that is being optimized.
sp_relation GClasses::GTargetFunction::m_pRelation [protected] |