Inheritance diagram for Purple::ObjectiveFunction:
Public Member Functions | |
ObjectiveFunction (void) | |
virtual | ~ObjectiveFunction (void) |
int | getNumberOfVariables (void) |
Vector< double > | getLowerBound (void) |
Vector< double > | getUpperBound (void) |
Matrix< double > | getDomain (void) |
double | getEpsilon (void) |
int | getNumberOfEvaluations (void) |
void | setNumberOfVariables (int) |
void | setLowerBound (Vector< double >) |
void | setUpperBound (Vector< double >) |
void | setDomain (Matrix< double >) |
void | setEpsilon (double) |
void | setNumberOfEvaluations (int) |
virtual double | getEvaluation (Vector< double >)=0 |
virtual Vector< double > | getGradient (Vector< double >) |
double | getGradientNorm (Vector< double >) |
virtual Matrix< double > | getHessian (Vector< double >) |
virtual Matrix< double > | getInverseHessian (Vector< double >) |
virtual void | print (Vector< double >) |
Protected Member Functions | |
double | getDeterminant (Matrix< double >) |
Protected Attributes | |
int | numberOfVariables |
Vector< double > | lowerBound |
Vector< double > | upperBound |
int | numberOfEvaluations |
double | epsilon |
Definition at line 26 of file ObjectiveFunction.h.
Purple::ObjectiveFunction::ObjectiveFunction | ( | void | ) |
General constructor. It creates an objective function object. It also initializes all the rest of class members to their default values:
Definition at line 34 of file ObjectiveFunction.cpp.
Purple::ObjectiveFunction::~ObjectiveFunction | ( | void | ) | [virtual] |
double Purple::ObjectiveFunction::getDeterminant | ( | Matrix< double > | matrix | ) | [protected] |
This method returns the determinant of a Matrix.
matrix,: | Matrix. |
Definition at line 681 of file ObjectiveFunction.cpp.
int Purple::ObjectiveFunction::getNumberOfVariables | ( | void | ) |
This method returns the number of variables in the objective function.
Definition at line 58 of file ObjectiveFunction.cpp.
Vector< double > Purple::ObjectiveFunction::getLowerBound | ( | void | ) |
This method returns the lower bound of the objective function domain.
Definition at line 71 of file ObjectiveFunction.cpp.
Vector< double > Purple::ObjectiveFunction::getUpperBound | ( | void | ) |
This method returns the upper bound of the objective function domain.
Definition at line 83 of file ObjectiveFunction.cpp.
Matrix< double > Purple::ObjectiveFunction::getDomain | ( | void | ) |
This method returns the objective function domain in a single Matrix. Row 0 contains the lower bound of the domain. Row 1 contains the upper bound of the domain.
Definition at line 97 of file ObjectiveFunction.cpp.
double Purple::ObjectiveFunction::getEpsilon | ( | void | ) |
This method returns the epsilon value to be used for numerical differentiation.
getHessian(void)
Definition at line 119 of file ObjectiveFunction.cpp.
int Purple::ObjectiveFunction::getNumberOfEvaluations | ( | void | ) |
This method returns the number of calls to the getEvaluation(Vector<double>) method.
Definition at line 132 of file ObjectiveFunction.cpp.
void Purple::ObjectiveFunction::setNumberOfVariables | ( | int | newNumberOfVariables | ) |
This method sets a new number of variables in the objective function
newNumberOfVariables,: | New number of variables in the objective function. |
Definition at line 144 of file ObjectiveFunction.cpp.
void Purple::ObjectiveFunction::setLowerBound | ( | Vector< double > | newLowerBound | ) |
This method sets a new lower bound in the objective function domain.
newLowerBound,: | New lower bound in the objective function domain. |
Definition at line 184 of file ObjectiveFunction.cpp.
void Purple::ObjectiveFunction::setUpperBound | ( | Vector< double > | newUpperBound | ) |
This method sets a new upper bound in the objective function domain.
newUpperBound,: | New upper bound in the objective function domain. |
Definition at line 233 of file ObjectiveFunction.cpp.
void Purple::ObjectiveFunction::setDomain | ( | Matrix< double > | newDomain | ) |
This method sets a new objective function domain from a single Matrix. Row 0 must contain the lower bound of the domain. Row 1 must contain the upper bound of the domain.
newDomain,: | New objective function domain. |
Definition at line 283 of file ObjectiveFunction.cpp.
void Purple::ObjectiveFunction::setEpsilon | ( | double | newEpsilon | ) |
This method sets a new epsilon value to be used for numerical differentiation.
newEpsilon,: | New value for epsilon. |
Definition at line 349 of file ObjectiveFunction.cpp.
void Purple::ObjectiveFunction::setNumberOfEvaluations | ( | int | newNumberOfEvaluations | ) |
This method sets the number of calls to the getEvaluation(Vector<double>) method to a new value.
newNumberOfEvaluations,: | New number of calls to the getEvaluation(Vector<double>) method. |
Definition at line 381 of file ObjectiveFunction.cpp.
virtual double Purple::ObjectiveFunction::getEvaluation | ( | Vector< double > | ) | [pure virtual] |
This method returns the evaluation value of an objective function for a given argument.
Implemented in Purple::DeJongFunction, Purple::PlaneCylinder, Purple::RastriginFunction, and Purple::RosenbrockFunction.
This method returns the objective function gradient vector for a given argument.
Reimplemented in Purple::DeJongFunction, and Purple::RastriginFunction.
Definition at line 397 of file ObjectiveFunction.cpp.
double Purple::ObjectiveFunction::getGradientNorm | ( | Vector< double > | gradient | ) |
This method returns the norm of the objective function gradient.
gradient,: | Objective function gradient Vector. |
Definition at line 446 of file ObjectiveFunction.cpp.
This method returns the objective function Hessian matrix for a given argument.
Reimplemented in Purple::DeJongFunction, and Purple::RastriginFunction.
Definition at line 475 of file ObjectiveFunction.cpp.
This method returns the inverse of the Hessian matrix for a given argument.
Reimplemented in Purple::DeJongFunction, and Purple::RastriginFunction.
Definition at line 577 of file ObjectiveFunction.cpp.
void Purple::ObjectiveFunction::print | ( | Vector< double > | ) | [virtual] |
This prints to the screen any useful information of the objective function for a given argument during the optimization process.
Reimplemented in Purple::PlaneCylinder.
Definition at line 669 of file ObjectiveFunction.cpp.
int Purple::ObjectiveFunction::numberOfVariables [protected] |
Vector<double> Purple::ObjectiveFunction::lowerBound [protected] |
Vector<double> Purple::ObjectiveFunction::upperBound [protected] |
int Purple::ObjectiveFunction::numberOfEvaluations [protected] |
Number of calls to the getEvaluation(Vector<double>) method.
Definition at line 47 of file ObjectiveFunction.h.
double Purple::ObjectiveFunction::epsilon [protected] |