Loading...
Searching...
No Matches
roboptim::SolverState< P > Class Template Reference

State of the solver. More...

#include <roboptim/core/solver-state.hh>

Inheritance diagram for roboptim::SolverState< P >:
Collaboration diagram for roboptim::SolverState< P >:

Public Types

typedef P problem_t
 Problem type.
typedef P::function_t::argument_t argument_t
 Import argument types from problem.
typedef P::value_type value_type
 Import value type from problem.
typedef P::function_t function_t
 Import function type from problem.
typedef std::map< std::string, StateParameter< function_t > > parameters_t
 Map of parameters.

Public Member Functions

 SolverState (const problem_t &problem)
 Instantiate a solver from a problem.
virtual ~SolverState ()
const argument_tx () const
 Retrieve the current optimization parameters.
argument_tx ()
const boost::optional< value_type > & cost () const
 Retrieve the current cost.
boost::optional< value_type > & cost ()
const boost::optional< value_type > & constraintViolation () const
 Retrieve the current constraint violation.
boost::optional< value_type > & constraintViolation ()
virtual std::ostream & print (std::ostream &) const
 Display the solver state on the specified output stream.
Parameters
const parameters_tparameters () const
parameters_tparameters ()
template<typename T>
const T & getParameter (const std::string &key) const
 Get a parameter.
template<typename T>
T & getParameter (const std::string &key)
 Get a parameter.

Protected Attributes

argument_t x_
 Current optimization parameters.
boost::optional< value_typecost_
 Current cost.
boost::optional< value_typeconstraintViolation_
 Current constraint violation.
parameters_t parameters_
 Solver state extra parameters (solver-specific parameters etc.).

Detailed Description

template<typename P>
class roboptim::SolverState< P >

State of the solver.

Template Parameters
Pproblem type.