Trajectory cost function defined by sum of state evaluations at parameters. More...
#include <roboptim/trajectory/trajectory-sum-cost.hh>
Public Types | |
typedef DerivableFunction | parent_t |
Parent type. | |
typedef T | trajectory_t |
Trajectory type. | |
typedef parent_t::vector_t | vector_t |
Import vector type. | |
typedef parent_t::gradient_t | gradient_t |
Import gradient type. | |
typedef parent_t::discreteInterval_t | discreteInterval_t |
Import discrete interval type. | |
Public Member Functions | |
TrajectorySumCost (const trajectory_t &gamma, boost::shared_ptr< DerivableFunction > cost, const discreteStableTimePointInterval_t &interval, size_type order=1) throw () | |
Constructor. | |
virtual | ~TrajectorySumCost () throw () |
size_type | order () const throw () |
Protected Member Functions | |
void | impl_compute (result_t &, const argument_t &) const throw () |
void | impl_gradient (gradient_t &, const argument_t &, size_type) const throw () |
Discrete interval of stable time points. | |
| |
typedef boost::tuple < StableTimePoint, StableTimePoint, StableTimePoint > | discreteStableTimePointInterval_t |
Types representing a discrete interval of stable time points. A discrete interval is a triplet of values:
| |
static discreteStableTimePointInterval_t | makeDiscreteInterval (StableTimePoint min, StableTimePoint max, StableTimePoint step) |
Construct a discrete interval. | |
static discreteStableTimePointInterval_t | makeDiscreteInterval (interval_t interval, StableTimePoint step) |
Construct a discrete interval. | |
static StableTimePoint | getLowerBound (const discreteStableTimePointInterval_t &interval) throw () |
Get the lower bound of a discrete interval. | |
static StableTimePoint | getUpperBound (const discreteStableTimePointInterval_t &interval) throw () |
Get the upper bound of a discrete interval. | |
static StableTimePoint | getStep (const discreteStableTimePointInterval_t &interval) throw () |
Get the upper step of a discrete interval. |
Trajectory cost function defined by sum of state evaluations at parameters.
The state along a trajectory is defined as the vector containing the configuration and derivatives up to order of the configuration.
where
T | trajectory type |
typedef parent_t::discreteInterval_t roboptim::TrajectorySumCost< T >::discreteInterval_t |
Import discrete interval type.
typedef boost::tuple<StableTimePoint, StableTimePoint, StableTimePoint> roboptim::TrajectorySumCost< T >::discreteStableTimePointInterval_t |
Types representing a discrete interval of stable time points. A discrete interval is a triplet of values:
typedef parent_t::gradient_t roboptim::TrajectorySumCost< T >::gradient_t |
Import gradient type.
typedef DerivableFunction roboptim::TrajectorySumCost< T >::parent_t |
Parent type.
typedef T roboptim::TrajectorySumCost< T >::trajectory_t |
Trajectory type.
typedef parent_t::vector_t roboptim::TrajectorySumCost< T >::vector_t |
Import vector type.
roboptim::TrajectorySumCost< T >::TrajectorySumCost | ( | const trajectory_t & | gamma, | |
boost::shared_ptr< DerivableFunction > | cost, | |||
const discreteStableTimePointInterval_t & | interval, | |||
size_type | order = 1 | |||
) | throw () |
Constructor.
gamma | Trajectory ![]() | |
cost | state cost: ![]() | |
interval | Stable time points list where cost will be evaluated. | |
order | order ![]() |
roboptim::TrajectorySumCost< T >::~TrajectorySumCost | ( | ) | throw () [virtual] |
static StableTimePoint roboptim::TrajectorySumCost< T >::getLowerBound | ( | const discreteStableTimePointInterval_t & | interval | ) | throw () [inline, static] |
Get the lower bound of a discrete interval.
interval | accessed discrete interval |
Referenced by roboptim::TrajectorySumCost< T >::makeDiscreteInterval().
static StableTimePoint roboptim::TrajectorySumCost< T >::getStep | ( | const discreteStableTimePointInterval_t & | interval | ) | throw () [inline, static] |
Get the upper step of a discrete interval.
interval | accessed discrete interval |
static StableTimePoint roboptim::TrajectorySumCost< T >::getUpperBound | ( | const discreteStableTimePointInterval_t & | interval | ) | throw () [inline, static] |
Get the upper bound of a discrete interval.
interval | accessed discrete interval |
Referenced by roboptim::TrajectorySumCost< T >::makeDiscreteInterval().
void roboptim::TrajectorySumCost< T >::impl_compute | ( | result_t & | res, | |
const argument_t & | p | |||
) | const throw () [protected] |
void roboptim::TrajectorySumCost< T >::impl_gradient | ( | gradient_t & | grad, | |
const argument_t & | p, | |||
size_type | i | |||
) | const throw () [protected] |
static discreteStableTimePointInterval_t roboptim::TrajectorySumCost< T >::makeDiscreteInterval | ( | StableTimePoint | min, | |
StableTimePoint | max, | |||
StableTimePoint | step | |||
) | [inline, static] |
Construct a discrete interval.
min | miminum value of the interval | |
max | maxinum value of the interval | |
step | discretization step |
static discreteStableTimePointInterval_t roboptim::TrajectorySumCost< T >::makeDiscreteInterval | ( | interval_t | interval, | |
StableTimePoint | step | |||
) | [inline, static] |
Construct a discrete interval.
interval | continuous interval | |
step | discretization step |
References roboptim::TrajectorySumCost< T >::getLowerBound(), and roboptim::TrajectorySumCost< T >::getUpperBound().
TrajectorySumCost< T >::size_type roboptim::TrajectorySumCost< T >::order | ( | ) | const throw () |