Optimization problem. More...
Classes | |
class | roboptim::Problem< T > |
class | roboptim::ResultWithWarnings |
Warnings have been merged to Result to simplify the API. More... | |
class | roboptim::Result |
Represents the solution of an optimization problem. More... | |
class | roboptim::SolverError |
Base exception class for solving errors. More... | |
class | roboptim::SolverFactory< S > |
Define a solver factory that instanciate the plug-ins. More... | |
struct | roboptim::StateParameter< F > |
Solver state parameters type. More... | |
class | roboptim::SolverState< P > |
State of the solver. More... | |
class | roboptim::SolverWarning |
Exception used for non-critical errors during optimization. More... | |
struct | roboptim::Parameter |
Solver parameter type. More... | |
class | roboptim::Solver< T > |
Solver for a specific problem class. More... | |
Functions | |
template<typename F > | |
std::ostream & | roboptim::operator<< (std::ostream &o, const StateParameter< F > ¶meter) |
Override operator<< to display ``parameters'' objects. More... | |
template<typename P > | |
std::ostream & | roboptim::operator<< (std::ostream &o, const SolverState< P > &state) |
Override operator<< to display ``parameters'' objects. More... | |
ROBOPTIM_CORE_DLLAPI std::ostream & | roboptim::operator<< (std::ostream &o, const SolverWarning &w) |
Override operator<< to handle warning display. More... | |
ROBOPTIM_CORE_DLLAPI std::ostream & | roboptim::operator<< (std::ostream &o, const Parameter ¶meter) |
Override operator<< to display ``parameters'' objects. More... | |
Optimization problem.
An optimization problem is defined as:
The goal of the optimization process is finding a point which minimizes the cost function and which respects the constraints (i.e. the result of some functions is inside of specific interval).
To use the class, one has to instantiate a problem with a reference to a cost function. Then, constraints can be added through the addConstraint method: a shared pointer to a function and an interval is needed.
The cost function is immutable.
Constraints are stored in a vector of smart pointers to function objects.
To add a constraint, use the following syntax:
where MyFunction is the function type.
Unlike other classes which just copy functions, pointers are used here in order to allow sub-classes of constraints to be inserted in the problem. For instance, a twice-differentiable function can be inserted in a problem which expects a differentiable function.
T | matrix type |
std::ostream & roboptim::operator<< | ( | std::ostream & | o, |
const SolverWarning & | w | ||
) |
Override operator<< to handle warning display.
o | output stream used for display |
w | warning to be displayed |
References roboptim::SolverWarning::print().
std::ostream & roboptim::operator<< | ( | std::ostream & | o, |
const Parameter & | parameter | ||
) |
Override operator<< to display ``parameters'' objects.
o | output stream used for display |
parameter | parameter |
References roboptim::Parameter::description, and roboptim::Parameter::value.
std::ostream & roboptim::operator<< | ( | std::ostream & | o, |
const StateParameter< F > & | parameter | ||
) |
Override operator<< to display ``parameters'' objects.
o | output stream used for display |
parameter | parameter to display |
F | function type. |
std::ostream & roboptim::operator<< | ( | std::ostream & | o, |
const SolverState< P > & | state | ||
) |
Override operator<< to display ``parameters'' objects.
o | output stream used for display |
state | solver state to display |
P | problem type. |