roboptim::Result Class Reference

Represents the solution of an optimization problem. More...

#include <roboptim/core/result.hh>

+ Inheritance diagram for roboptim::Result:

Public Types

typedef Function::size_type size_type
 Import size type from Function class. More...
 
typedef Function::vector_t vector_t
 Import vector type from Function class. More...
 

Public Member Functions

 Result (const size_type inputSize, const size_type outputSize=1) throw ()
 Instantiate a result and fix input/output sizes. More...
 
virtual ~Result () throw ()
 
virtual std::ostream & print (std::ostream &o) const throw ()
 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...
 
vector_t x
 Point found by the solver. More...
 
vector_t value
 Function value at the solver found point. More...
 
vector_t constraints
 Constraints final values. More...
 
vector_t lambda
 Lagrange multipliers. More...
 

Detailed Description

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.

Examples:
result.cc.

Member Typedef Documentation

Import size type from Function class.

Import vector type from Function class.

Constructor & Destructor Documentation

roboptim::Result::Result ( const size_type  inputSize,
const size_type  outputSize = 1 
) throw ()
explicit

Instantiate a result and fix input/output sizes.

Parameters
inputSizeinput size value
outputSizeoutput size value
roboptim::Result::~Result ( ) throw ()
virtual

Member Function Documentation

std::ostream & roboptim::Result::print ( std::ostream &  o) const throw ()
virtual

Display the result on the specified output stream.

Parameters
ooutput stream used for display
Returns
output stream

Reimplemented in roboptim::ResultWithWarnings.

References roboptim::decindent(), roboptim::iendl(), and roboptim::incindent().

Referenced by roboptim::operator<<(), and roboptim::ResultWithWarnings::print().

Member Data Documentation

vector_t roboptim::Result::constraints

Constraints final values.

size_type roboptim::Result::inputSize

Input size (i.e. argument size).

vector_t roboptim::Result::lambda

Lagrange multipliers.

Examples:
result.cc.
size_type roboptim::Result::outputSize

Output size (i.e. result size).

vector_t roboptim::Result::value

Function value at the solver found point.

Examples:
result.cc.
vector_t roboptim::Result::x

Point found by the solver.

Examples:
result.cc.