Public Member Functions |
| Solver (const problem_t &problem) throw () |
| Instantiate a solver from a problem.
|
template<typename F_ , typename C_ > |
| Solver (const Problem< F_, C_ > &problem) throw () |
| Instantiate a solver from a problem in a different problem class.
|
virtual | ~Solver () throw () |
const problem_t & | problem () const throw () |
| Retrieve the problem.
|
virtual std::ostream & | print (std::ostream &) const throw () |
| Display the solver on the specified output stream.
|
void | reset () throw () |
| Force to restart the optimization. Reset the internal mechanism to force the solution to be re-computed next time getMinimum is called.
|
virtual void | solve ()=0 throw () |
| Solve the problem. Called automatically by getMinimum if required.
|
const result_t & | minimum () throw () |
| Returns the function minimum This solves the problem automatically, if it has not yet been solved.
|
solutions | minimumType () throw () |
| Determine real minimum type.
|
template<typename T > |
const T & | getMinimum () throw (boost::bad_get) |
| Get real result.
|
| GenericSolver () throw () |
| GenericSolver (const GenericSolver &) throw () |
virtual | ~GenericSolver () throw () |
template<typename F, typename C>
class roboptim::Solver< F, C >
Solver for a specific problem class.
This class is parametrized by two types: the cost function type and the constraints type.
Solver classes are immutable, the problem can not be changed after the class instantiation.
- Template Parameters:
-
F | cost function type |
C | constraints functions type |
- Precondition:
- F is a subtype of Function
template<typename F , typename C >
template<typename F_ , typename C_ >
Instantiate a solver from a problem in a different problem class.
This constructor is called when the problem cost function or/and constraints type does not match solver's types.
This is only possible if the problem provides too much information compared to the solver requirements: if the problem contains twice derivable function and the solver requires only derivable function, it will work however the opposite will fail. Problem compatibility is known at compile-time, so the failure will be at compile-time.
- Template Parameters:
-
F_ | original cost function type |
C_ | original constraints functions type |
- Parameters:
-
problem | problem that should be solved |