All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
roboptim Namespace Reference

Meta-functions, functions and solvers related classes. More...

## Namespaces

| detail
| fg
| finiteDifferenceGradientPolicies
| Contains finite difference gradients policies.
| visualization
| Graphic visualization.

## Classes

class | ConstantFunction
| Constant function. More...
class | DerivableParametrizedFunction
| Parametrized function with parameter derivative available. More...
struct | derivativeSize< Function >
struct | derivativeSize< DifferentiableFunction >
struct | derivativeSize< TwiceDifferentiableFunction >
struct | derivativeSize< NTimesDerivableFunction< N > >
class | GenericDifferentiableFunction
| Define an abstract derivable function ( ). More...
class | CachedFunction
| Store previous function computation. More...
class | Split
class | BadGradient
| Exception thrown when a gradient check fail. More...
class | GenericFiniteDifferenceGradient
| Compute automatically a gradient with finite differences. More...
struct | GenericFunctionTraits
| GenericFunction traits. More...
class | GenericFunction
| Define an abstract mathematical function ( ). More...
struct | GenericFunctionTraits< EigenMatrixDense >
| Trait specializing GenericFunction for Eigen dense matrices. More...
struct | GenericFunctionTraits< EigenMatrixSparse >
| Trait specializing GenericFunction for Eigen sparse matrices. More...
class | NoSolution
| Tag a result if no solution has been found. More...
struct | EigenMatrixDense
| Tag type for functions using Eigen dense matrices. More...
struct | EigenMatrixSparse
| Tag type for functions using Eigen sparse matrices. More...
class | GenericNumericLinearFunction
| Build a linear function from a vector and a matrix. More...
class | GenericTwiceDifferentiableFunction
| Define an abstract function which is derivable twice ( ). More...
class | GenericLinearFunction
| Define an abstract linear function. More...
class | GenericQuadraticFunction
| Define an abstract quadratic function. More...
class | Problem
class | Solver
| Solver for a specific problem class. More...
class | SolverFactory
| Define a solver factory that instanciate the plug-ins. More...
class | NTimesDerivableFunction
| Define a function, derivable n times ( ). More...
struct | derivativeSize
class | GenericSolver
| Abstract interface satisfied by all solvers. More...
class | IdentityFunction
| Identity function. More...
class | NTimesDerivableFunction< 2 >
| Explicit specialization for the stop case of NTimesDerivable class. More...
class | NumericQuadraticFunction
| Build a quadratic function from a matrix and a vector. More...
class | ParametrizedFunction
| Define an abstract parametrized mathematical function ( ). More...
class | DummySolverLastState
| Dummy solver which always fails, but returns the last state of the solver. More...
class | DummySolver
| Dummy solver which always fails. More...
class | Problem< F, boost::mpl::vector<> >
class | ResultWithWarnings
| Represents the solution of an optimization problem when errors occurred during the solving process. More...
class | Result
| Represents the solution of an optimization problem. More...
class | SolverError
| Base exception class for solving errors. More...
class | SolverWarning
| Exception used for non-critical errors during optimization. More...
struct | Parameter
| Parameters type. More...
class | SumOfC1Squares
| Sum of the squares of differentiable functions. More...

## Typedefs

typedef DifferentiableFunction | DerivableFunction
| Legacy name of TwiceDifferentiableFunction. More...
typedef GenericFunction < EigenMatrixDense > | Function
| Dense function. More...
typedef GenericFunction < EigenMatrixSparse > | SparseFunction
| Sparse function. More...
typedef GenericDifferentiableFunction < EigenMatrixDense > | DifferentiableFunction
| Dense differentiable function. More...
typedef GenericDifferentiableFunction < EigenMatrixSparse > | DifferentiableSparseFunction
| Sparse differentiable function. More...
typedef GenericNumericLinearFunction < EigenMatrixDense > | NumericLinearFunction
typedef GenericTwiceDifferentiableFunction < EigenMatrixDense > | TwiceDifferentiableFunction
typedef GenericTwiceDifferentiableFunction < EigenMatrixSparse > | TwiceDifferentiableSparseFunction
typedef GenericLinearFunction < EigenMatrixDense > | LinearFunction
typedef GenericLinearFunction < EigenMatrixSparse > | LinearSparseFunction
typedef GenericQuadraticFunction < EigenMatrixDense > | QuadraticFunction
typedef GenericQuadraticFunction < EigenMatrixSparse > | QuadraticSparseFunction
typedef TwiceDifferentiableFunction | TwiceDerivableFunction
| Legacy name of DifferentiableFunction. More...

## Functions

template<typename P , typename C >
void | addNonScalarConstraint (P &problem, boost::shared_ptr< C > constraint, std::vector< Function::interval_t > interval, std::vector< Function::value_type > scale=std::vector< Function::value_type >()) throw (std::runtime_error)
template<typename T >
std::ostream & | operator<< (std::ostream &o, const BadGradient< T > &f)
| Override operator<< to handle exception display. More...
template<typename T >
bool | checkGradient (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::size_type functionId, const typename GenericDifferentiableFunction< T >::vector_t &x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold) throw ()
| Check if a gradient is valid. More...
template<typename T >
void | checkGradientAndThrow (const GenericDifferentiableFunction< T > &function, typename GenericDifferentiableFunction< T >::size_type functionId, const typename GenericDifferentiableFunction< T >::vector_t &x, typename GenericDifferentiableFunction< T >::value_type threshold=finiteDifferenceThreshold) throw (BadGradient<T>)
template<typename T >
std::ostream & | operator<< (std::ostream &o, const GenericFunction< T > &f)
| Override operator<< to handle function display. More...
ROBOPTIM_DLLAPI std::ostream & | operator<< (std::ostream &o, const GenericSolver &gs)
| Override operator<< to handle solver display. More...
ROBOPTIM_DLLAPI std::ostream & | operator<< (std::ostream &o, const NoSolution &ns)
| Override operator<< to display ``no solution'' objects. More...
ROBOPTIM_DLLAPI long int & | indent (std::ostream &o)
| The current indentation level for o. More...
ROBOPTIM_DLLAPI std::ostream & | incindent (std::ostream &o)
| Increment the indentation. More...
ROBOPTIM_DLLAPI std::ostream & | decindent (std::ostream &o)
| Decrement the indentation. More...
ROBOPTIM_DLLAPI std::ostream & | resetindent (std::ostream &o)
| Reset the indentation. More...
ROBOPTIM_DLLAPI std::ostream & | iendl (std::ostream &o)
| Print an end of line, then set the indentation. More...
ROBOPTIM_DLLAPI std::ostream & | incendl (std::ostream &o)
| Increment the indentation, print an end of line, and set the indentation. More...
ROBOPTIM_DLLAPI std::ostream & | decendl (std::ostream &o)
| Decrement the indentation, print an end of line, and set the indentation. More...
template<typename F >
std::ostream & | operator<< (std::ostream &o, const ParametrizedFunction< F > &f)
| Override operator<< to handle function display. More...
template<typename F >
std::ostream & | operator<< (std::ostream &o, const Problem< F, boost::mpl::vector<> > &pb)
| Override operator<< to handle problem display. More...
template<typename F , typename CLIST >
std::ostream & | operator<< (std::ostream &o, const Problem< F, CLIST > &pb)
| Override operator<< to handle problem display. More...
ROBOPTIM_DLLAPI std::ostream & | operator<< (std::ostream &o, const Result &r)
| Override operator<< to handle result display. More...
ROBOPTIM_DLLAPI std::ostream & | operator<< (std::ostream &o, const SolverError &e)
| Override operator<< to handle error display. More...
template<typename T >
T * | unionCast (void *ptr)
ROBOPTIM_DLLAPI std::ostream & | operator<< (std::ostream &o, const Parameter &parameter)
| Override operator<< to display ``parameters'' objects. More...
template<typename T >
std::ostream & | operator<< (std::ostream &, const std::vector< T > &)
| Display a vector. More...
template<typename T1 , typename T2 >
std::ostream & | operator<< (std::ostream &, const std::pair< T1, T2 > &)
| Display a pair. More...
template<typename T >
std::ostream & | operator<< (std::ostream &, const Eigen::MatrixBase< T > &)
| Display an Eigen object with the appropriate IOFormat. More...

## Variables

static const double | finiteDifferenceThreshold = 1e-4
| Default threshold for checkGradient. More...
static const double | finiteDifferenceEpsilon = 1e-8
| Default epsilon for finite difference class. More...

## Detailed Description

Meta-functions, functions and solvers related classes.

## Typedef Documentation

typedef DifferentiableFunction roboptim::DerivableFunction

Legacy name of TwiceDifferentiableFunction.

typedef GenericDifferentiableFunction<EigenMatrixDense> roboptim::DifferentiableFunction

Dense differentiable function.

Examples:
  problem-cc.cc.

typedef GenericDifferentiableFunction<EigenMatrixSparse> roboptim::DifferentiableSparseFunction

Sparse differentiable function.

typedef GenericFunction<EigenMatrixDense> roboptim::Function

Dense function.

Examples:
  visualization-gnuplot-function.cc.

typedef GenericLinearFunction<EigenMatrixDense> roboptim::LinearFunction

typedef GenericLinearFunction<EigenMatrixSparse> roboptim::LinearSparseFunction

typedef GenericNumericLinearFunction<EigenMatrixDense> roboptim::NumericLinearFunction

typedef GenericQuadraticFunction<EigenMatrixDense> roboptim::QuadraticFunction

typedef GenericQuadraticFunction<EigenMatrixSparse> roboptim::QuadraticSparseFunction

typedef GenericFunction<EigenMatrixSparse> roboptim::SparseFunction

Sparse function.

typedef TwiceDifferentiableFunction roboptim::TwiceDerivableFunction

Legacy name of DifferentiableFunction.

typedef GenericTwiceDifferentiableFunction<EigenMatrixDense> roboptim::TwiceDifferentiableFunction

typedef GenericTwiceDifferentiableFunction<EigenMatrixSparse> roboptim::TwiceDifferentiableSparseFunction

## Function Documentation

std::ostream & roboptim::decendl | ( | std::ostream & | o | ) |

Decrement the indentation, print an end of line, and set the indentation.

References decindent(), and iendl().

std::ostream & roboptim::decindent | ( | std::ostream & | o | ) |

Decrement the indentation.

References indent().

Referenced by decendl(), roboptim::detail::printConstraint< P >::operator()(), roboptim::ConstantFunction::print(), roboptim::IdentityFunction::print(), roboptim::BadGradient< T >::print(), roboptim::GenericNumericLinearFunction< T >::print(), roboptim::NumericQuadraticFunction::print(), roboptim::Result::print(), roboptim::ResultWithWarnings::print(), roboptim::Solver< F, C >::print(), roboptim::Problem< F, boost::mpl::vector<> >::print(), and roboptim::Problem< F, C >::print().

std::ostream & roboptim::iendl | ( | std::ostream & | o | ) |

Print an end of line, then set the indentation.

References indent().

Referenced by decendl(), incendl(), roboptim::detail::printConstraint< P >::operator()(), roboptim::ConstantFunction::print(), roboptim::IdentityFunction::print(), roboptim::BadGradient< T >::print(), roboptim::GenericNumericLinearFunction< T >::print(), roboptim::NumericQuadraticFunction::print(), roboptim::Result::print(), roboptim::ResultWithWarnings::print(), roboptim::Solver< F, C >::print(), roboptim::Problem< F, boost::mpl::vector<> >::print(), and roboptim::Problem< F, C >::print().

std::ostream & roboptim::incendl | ( | std::ostream & | o | ) |

Increment the indentation, print an end of line, and set the indentation.

References iendl(), and incindent().

Referenced by roboptim::Problem< F, boost::mpl::vector<> >::print(), and roboptim::Problem< F, C >::print().

std::ostream & roboptim::incindent | ( | std::ostream & | o | ) |

Increment the indentation.

References indent().

Referenced by incendl(), roboptim::detail::printConstraint< P >::operator()(), roboptim::ConstantFunction::print(), roboptim::IdentityFunction::print(), roboptim::BadGradient< T >::print(), roboptim::GenericNumericLinearFunction< T >::print(), roboptim::NumericQuadraticFunction::print(), roboptim::Result::print(), roboptim::ResultWithWarnings::print(), and roboptim::Solver< F, C >::print().

long int & roboptim::indent | ( | std::ostream & | o | ) |

The current indentation level for o.

Referenced by decindent(), iendl(), incindent(), roboptim::GenericTwiceDifferentiableFunction< T >::print(), roboptim::GenericDifferentiableFunction< T >::print(), roboptim::GenericFunction< T >::print(), and resetindent().

template<typename T >

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const std::vector< T > & | vect
| ) |  |

Display a vector.

template<typename T1 , typename T2 >

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const std::pair< T1, T2 > & | p
| ) |  |

Display a pair.

template<typename T >

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const Eigen::MatrixBase< T > & | matrix
| ) |  |

Display an Eigen object with the appropriate IOFormat.

template<typename T >

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const BadGradient< T > & | f
| ) |  |

Override operator<< to handle exception display.

Parameters

  o | output stream used for display
  f | function to be displayed

Returns
  output stream

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const Result & | r
| ) |  |

Override operator<< to handle result display.

Parameters

  o | output stream used for display
  r | result to be displayed

Returns
  output stream

References roboptim::Result::print().

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const SolverError & | e
| ) |  |

Override operator<< to handle error display.

Parameters

  o | output stream used for display
  e | error to be displayed

Returns
  output stream

References roboptim::SolverError::print().

template<typename F >

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const ParametrizedFunction< F > & | f
| ) |  |

Override operator<< to handle function display.

Parameters

  o | output stream used for display
  f | function to be displayed

Returns
  output stream

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const GenericSolver & | gs
| ) |  |

Override operator<< to handle solver display.

Parameters

  o | output stream used for display
  gs | solver to be displayed

Returns
  output stream

References roboptim::GenericSolver::print().

std::ostream & roboptim::operator<< | ( | std::ostream & | o,
|  | const NoSolution & | ns
| ) |  |

Override operator<< to display ``no solution'' objects.

Parameters

  o | output stream used for display
  ns | NoSolution object, ignored

Returns
  output stream

std::ostream & roboptim::resetindent | ( | std::ostream & | o | ) |

Reset the indentation.

References indent().

template<typename T >

T* roboptim::unionCast | ( | void * | ptr | ) |

## Variable Documentation

const double roboptim::finiteDifferenceEpsilon = 1e-8

static

Default epsilon for finite difference class.

const double roboptim::finiteDifferenceThreshold = 1e-4

static

Default threshold for checkGradient.