Represents the solution of an optimization problem. More...
#include <roboptim/core/result.hh>
Public Types | |
| typedef Function::size_type | size_type |
| Import size type from Function class. More... | |
| typedef Function::value_type | value_type |
| Import value type from Function class. More... | |
| typedef Function::vector_t | vector_t |
| Import vector type from Function class. More... | |
| typedef Function::argument_t | argument_t |
| Import argument type from Function class. More... | |
| typedef Function::result_t | result_t |
| Import result type from Function class. More... | |
Public Member Functions | |
| Result (const size_type inputSize, const size_type outputSize=1) | |
| Instantiate a result and fix input/output sizes. More... | |
| virtual | ~Result () |
| virtual std::ostream & | print (std::ostream &o) const |
| Display the result on the specified output stream. More... | |
Public Attributes | |
| size_type | inputSize |
| Input size (i.e. argument size). More... | |
| size_type | outputSize |
| Output size (i.e. result size). More... | |
| argument_t | x |
| Point found by the solver. More... | |
| result_t | value |
| Function value at the point found by the solver. More... | |
| result_t | constraints |
| Final constraints values. More... | |
| value_type | constraint_violation |
| Final violation of the constraints. More... | |
| vector_t | lambda |
| Lagrange multipliers. More... | |
| std::vector< SolverWarning > | warnings |
| Vector of warnings. More... | |
Represents the solution of an optimization problem.
This class is returned by a solver if a result has been found. It is a set of mutable fields representing the solution and its associated meta-information.
A vector of warnings is provided, which can help identify the cause of termination or possible issues in the optimization process.
| typedef Function::argument_t roboptim::Result::argument_t |
Import argument type from Function class.
| typedef Function::result_t roboptim::Result::result_t |
Import result type from Function class.
Import size type from Function class.
Import value type from Function class.
| typedef Function::vector_t roboptim::Result::vector_t |
Import vector type from Function class.
Instantiate a result and fix input/output sizes.
| inputSize | input size value |
| outputSize | output size value |
References constraints, lambda, value, and x.
|
virtual |
|
virtual |
Display the result on the specified output stream.
| o | output stream used for display |
References constraint_violation, constraints, roboptim::decindent(), roboptim::iendl(), roboptim::incindent(), roboptim::GenericFunction< T >::infinity(), inputSize, lambda, outputSize, value, warnings, and x.
Referenced by roboptim::operator<<().
| value_type roboptim::Result::constraint_violation |
Final violation of the constraints.
Referenced by print().
| result_t roboptim::Result::constraints |
Final constraints values.
Referenced by print(), Result(), and roboptim::GenericDummySolverLastState< T >::solve().
| vector_t roboptim::Result::lambda |
Lagrange multipliers.
The vector of multipliers is expected to be ordered as follows:
Referenced by roboptim::ResultAnalyzer< T >::checkKKT(), print(), Result(), and roboptim::GenericDummySolverLastState< T >::solve().
| result_t roboptim::Result::value |
Function value at the point found by the solver.
Referenced by print(), Result(), and roboptim::GenericDummySolverLastState< T >::solve().
| std::vector<SolverWarning> roboptim::Result::warnings |
Vector of warnings.
Each element of this vector is a potential problem that occurred during the optimization. It may also simply indicate how the optimization terminated (e.g. user-defined callback).
Referenced by print().
| argument_t roboptim::Result::x |
Point found by the solver.
Referenced by roboptim::ResultAnalyzer< T >::checkKKT(), print(), Result(), and roboptim::GenericDummySolverLastState< T >::solve().