#include <Problem.h>

Public Member Functions | |
| Problem () | |
| Creates problem.  | |
| virtual | ~Problem () | 
| Destroys problem.  | |
| Term * | setObjectiveFunction (Term *term) | 
| Sets objective function.   | |
| Term * | getObjectiveFunction () | 
| Get objective function.   | |
| Term * | addTerm (Term *term) | 
| Adds term to problem.   | |
| TermVariable * | addVariable (TermVariable *variable) | 
| Adds variable to problem.   | |
| TermPointerVector * | getGradient () | 
| Calculates gradient.   | |
| TermPointerVector * | getHessian () | 
| Gets terms of Hessian.   | |
| TermVariablePointerVector * | getVariables () | 
| Gets variables.   | |
| bool | gradient (const DoubleVector *values, DoubleVector **gradient) | 
| Calculates the gradient.   | |
| bool | hessian (const DoubleVector *values, DoubleVector **hessian) | 
| Calculates Hessian matrix.   | |
| size_t | numberOfTerms () | 
| Gets number of terms.   | |
| size_t | numberOfVariables () | 
| Gets number of variables.   | |
| bool | objective (const DoubleVector *values, double *obj) | 
| Calculates objective.   | |
Adds term to problem.
The method checks if an equivalent term already exists on the list. If so the equivalent term is returned and the term passed as argument is deleted.
| term | term to be added | 
Definition at line 60 of file Problem.cc.


| TermVariable * Problem::addVariable | ( | TermVariable * | variable | ) | 
Adds variable to problem.
The method checks if an equivalent variable already exists on the list. If so the equivalent variable is returned and the variable passed as argument is deleted. The argument is set to the equivalent variable.
| variable | variable to be added | 
Definition at line 85 of file Problem.cc.


| TermPointerVector * Problem::getGradient | ( | ) | 
Calculates gradient.
| values | values of variables | 
| gradient | gradient | 
Definition at line 138 of file Problem.cc.
| TermPointerVector * Problem::getHessian | ( | ) | 
| Term * Problem::getObjectiveFunction | ( | ) | 
| TermVariablePointerVector * Problem::getVariables | ( | ) | 
| bool Problem::gradient | ( | const DoubleVector * | values, | 
| DoubleVector ** | gradient | ||
| ) | 
Calculates the gradient.
Caller is responsible for deleting gradient.
| values | values of variables | 
| gradient | gradient | 
Definition at line 174 of file Problem.cc.
| bool Problem::hessian | ( | const DoubleVector * | values, | 
| DoubleVector ** | hessian | ||
| ) | 
Calculates Hessian matrix.
Caller is responsible for deleting Hessian.
| values | values of variables | 
| hessian | 
Definition at line 197 of file Problem.cc.
| size_t Problem::numberOfTerms | ( | ) | 
| size_t Problem::numberOfVariables | ( | ) | 
| bool Problem::objective | ( | const DoubleVector * | values, | 
| double * | obj | ||
| ) | 
Calculates objective.
| values | |
| obj | 
Definition at line 235 of file Problem.cc.

Sets objective function.
| term | objective function | 
Definition at line 100 of file Problem.cc.

 1.8.1.2