All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
roboptim::trajectory::ConstraintsOverSplines< T, S > Class Template Reference

Constraint function on a spline's interval. More...

#include <roboptim/trajectory/constraints-over-splines.hh>

Inheritance diagram for roboptim::trajectory::ConstraintsOverSplines< T, S >:

Public Types

typedef S::polynomial_t polynomial_t
 
typedef Function::interval_t interval_t
 
typedef std::vector< polynomial_tpolynomials_t
 
typedef S spline_t
 
typedef boost::shared_ptr
< spline_t
splinePtr_t
 
typedef std::vector
< boost::shared_ptr< S > > 
splines_t
 

Public Member Functions

 ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (roboptim::GenericDifferentiableFunction< T >)
 
 ConstraintsOverSplines (const splines_t &splines, size_t splineIdx, unsigned int order, value_type startingPoint, size_type inputSize)
 Constructor. More...
 

Protected Member Functions

polynomial_t toPoly (const_argument_ref x) const
 
virtual void impl_compute (result_ref result, const_argument_ref x) const
 
virtual void impl_gradient (gradient_ref grad, const_argument_ref x, size_type i) const
 

Static Protected Member Functions

static std::string GenerateName (const splines_t &splines, size_t splineIdx, unsigned int order, value_type startingPoint)
 Generate the name of the constraint. More...
 
static interval_t ComputeInterval (const splines_t &splines, size_t splineIdx, value_type startingPoint)
 Compute the range of the time interval. More...
 
static size_t ComputeIntervalIdx (const splines_t &splines, size_t splineIdx, value_type startingPoint)
 Determine the interval index of the constraint. More...
 
static size_type ComputeStartIdx (const splines_t &splines, size_t splineIdx)
 Determine the first index in the argument vector, assuming all joint control points are contiguous. More...
 

Protected Attributes

size_t order_
 Order of the spline (e.g. 3 for cubic). More...
 
S::interval_t interval_
 Time range of the constraint. More...
 
size_type startingIndex_
 Index of the influencing control points. More...
 
polynomials_t basisPolynomials_
 Basis polynomials used for gradient computation. More...
 
spline_t spline_
 Constrained spline. More...
 
size_t intervalIdx_
 Index of the constrained time interval. More...
 

Detailed Description

template<typename T, typename S>
class roboptim::trajectory::ConstraintsOverSplines< T, S >

Constraint function on a spline's interval.

Template Parameters
TMatrix type
SSpline type

Member Typedef Documentation

template<typename T, typename S>
typedef Function::interval_t roboptim::trajectory::ConstraintsOverSplines< T, S >::interval_t
template<typename T, typename S>
typedef S::polynomial_t roboptim::trajectory::ConstraintsOverSplines< T, S >::polynomial_t
template<typename T, typename S>
typedef std::vector<polynomial_t> roboptim::trajectory::ConstraintsOverSplines< T, S >::polynomials_t
template<typename T, typename S>
typedef S roboptim::trajectory::ConstraintsOverSplines< T, S >::spline_t
template<typename T, typename S>
typedef boost::shared_ptr<spline_t> roboptim::trajectory::ConstraintsOverSplines< T, S >::splinePtr_t
template<typename T, typename S>
typedef std::vector<boost::shared_ptr<S> > roboptim::trajectory::ConstraintsOverSplines< T, S >::splines_t

Constructor & Destructor Documentation

template<typename T , typename S >
roboptim::trajectory::ConstraintsOverSplines< T, S >::ConstraintsOverSplines ( const splines_t splines,
size_t  splineIdx,
unsigned int  order,
value_type  startingPoint,
size_type  inputSize 
)

Constructor.

Parameters
splinesvector of splines.
splineIdxindex of the spline to constrain.
orderderivation order of the spline to constain.
startingPointstarting point of the constraint.
inputSizeinput size of the problem.

Member Function Documentation

template<typename T , typename S >
ConstraintsOverSplines< T, S >::interval_t roboptim::trajectory::ConstraintsOverSplines< T, S >::ComputeInterval ( const splines_t splines,
size_t  splineIdx,
value_type  startingPoint 
)
staticprotected

Compute the range of the time interval.

Parameters
splinesvector of splines.
splineIdxindex of the spline to constrain.
startingPointstarting point of the constraint.
template<typename T , typename S >
size_t roboptim::trajectory::ConstraintsOverSplines< T, S >::ComputeIntervalIdx ( const splines_t splines,
size_t  splineIdx,
value_type  startingPoint 
)
staticprotected

Determine the interval index of the constraint.

Parameters
splinesvector of splines.
splineIdxindex of the spline to constrain.
startingPointstarting point of the constraint.
template<typename T , typename S >
ConstraintsOverSplines< T, S >::size_type roboptim::trajectory::ConstraintsOverSplines< T, S >::ComputeStartIdx ( const splines_t splines,
size_t  splineIdx 
)
staticprotected

Determine the first index in the argument vector, assuming all joint control points are contiguous.

Parameters
splinesvector of splines.
splineIdxindex of the spline to constrain.
template<typename T , typename S >
std::string roboptim::trajectory::ConstraintsOverSplines< T, S >::GenerateName ( const splines_t splines,
size_t  splineIdx,
unsigned int  order,
value_type  startingPoint 
)
staticprotected

Generate the name of the constraint.

Parameters
splinesvector of splines.
splineIdxindex of the spline to constrain.
orderderivation order of the spline to constain.
startingPointstarting point of the constraint.
template<typename T , typename S >
void roboptim::trajectory::ConstraintsOverSplines< T, S >::impl_compute ( result_ref  result,
const_argument_ref  x 
) const
protectedvirtual
template<typename T , typename S >
void roboptim::trajectory::ConstraintsOverSplines< T, S >::impl_gradient ( gradient_ref  grad,
const_argument_ref  x,
size_type  i 
) const
protectedvirtual
template<typename T, typename S>
roboptim::trajectory::ConstraintsOverSplines< T, S >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ ( roboptim::GenericDifferentiableFunction< T >  )
template<typename T , typename S >
ConstraintsOverSplines< T, S >::polynomial_t roboptim::trajectory::ConstraintsOverSplines< T, S >::toPoly ( const_argument_ref  x) const
protected

Member Data Documentation

template<typename T, typename S>
polynomials_t roboptim::trajectory::ConstraintsOverSplines< T, S >::basisPolynomials_
protected

Basis polynomials used for gradient computation.

template<typename T, typename S>
S::interval_t roboptim::trajectory::ConstraintsOverSplines< T, S >::interval_
protected

Time range of the constraint.

template<typename T, typename S>
size_t roboptim::trajectory::ConstraintsOverSplines< T, S >::intervalIdx_
protected

Index of the constrained time interval.

template<typename T, typename S>
size_t roboptim::trajectory::ConstraintsOverSplines< T, S >::order_
protected

Order of the spline (e.g. 3 for cubic).

template<typename T, typename S>
spline_t roboptim::trajectory::ConstraintsOverSplines< T, S >::spline_
mutableprotected

Constrained spline.

template<typename T, typename S>
size_type roboptim::trajectory::ConstraintsOverSplines< T, S >::startingIndex_
protected

Index of the influencing control points.