roboptim::Freeze< P > Class Template Reference

Add constraints that freeze parameters. More...

#include <roboptim/trajectory/freeze.hh>

List of all members.

Public Types

typedef std::pair< size_t,
Function::value_type > 
frozenArgument_t
 Pair representing an argument index and a value.
typedef P problem_t
 Problem type.
typedef std::vector
< frozenArgument_t
frozenArguments_t
 Vector of pairs (argument index, value).

Public Member Functions

 Freeze (problem_t &problem) throw ()
 Create the constraint from a vector of pairs.
virtual ~Freeze () throw ()
void operator() (const frozenArguments_t fa) throw ()
 Apply modification.
void operator() (const std::vector< Function::size_type > &indices, const Function::vector_t &values) throw ()
 Apply modification.

Detailed Description

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

Add constraints that freeze parameters.

This constraint expects a vector of pairs (argument id, value) to build a function that will freeze the given arguments to their associated value.

For instance, the vector: [(0, 5.), (3, -12.)] forces the first parameter to five and the fourth one to minus twelve.

This adds to the problem one linear constraint per frozen parameter.


Member Typedef Documentation

template<typename P >
typedef std::pair<size_t, Function::value_type> roboptim::Freeze< P >::frozenArgument_t

Pair representing an argument index and a value.

template<typename P >
typedef std::vector<frozenArgument_t> roboptim::Freeze< P >::frozenArguments_t

Vector of pairs (argument index, value).

This type define what are the frozen arguments and what their value.

template<typename P >
typedef P roboptim::Freeze< P >::problem_t

Problem type.


Constructor & Destructor Documentation

template<typename P >
roboptim::Freeze< P >::Freeze ( problem_t problem  )  throw () [inline]

Create the constraint from a vector of pairs.

Parameters:
problem problem that will be modified.
template<typename P >
roboptim::Freeze< P >::~Freeze (  )  throw () [inline, virtual]

Member Function Documentation

template<typename P >
void roboptim::Freeze< P >::operator() ( const std::vector< Function::size_type > &  indices,
const Function::vector_t &  values 
) throw () [inline]

Apply modification.

Parameters:
indices Vector of parameters index that will be frozen.
values Vector of parameters values.
template<typename P >
void roboptim::Freeze< P >::operator() ( const frozenArguments_t  fa  )  throw () [inline]

Apply modification.

Parameters:
fa Vector of pairs containing what to freeze and to what value.