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) | |
| Constructor.   | |
| virtual | ~TrajectorySumCost () | 
| size_type | order () const | 
Protected Member Functions | |
| void | impl_compute (result_ref, const_argument_ref) const | 
| void | impl_gradient (gradient_ref, const_argument_ref, size_type) const | 
Discrete interval of stable time points. | |
| typedef boost::tuple < StableTimePoint, StableTimePoint, StableTimePoint >  | discreteStableTimePointInterval_t | 
| Types representing a discrete interval of stable time points.   | |
| 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) | 
| Get the lower bound of a discrete interval.   | |
| static StableTimePoint | getUpperBound (const discreteStableTimePointInterval_t &interval) | 
| Get the upper bound of a discrete interval.   | |
| static StableTimePoint | getStep (const discreteStableTimePointInterval_t &interval) | 
| 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 \(r\) of the configuration.
\[ \textbf{Cost}(\Gamma) = \sum_{i=1}{n} cost \left({\Gamma(t_i)}, {\dot{\Gamma}(t_i)},\cdots,\frac{d^{r}\Gamma}{dt^{r}}(t_i) \right) \]
where
| T | trajectory type | 
| typedef parent_t::discreteInterval_t roboptim::trajectory::TrajectorySumCost< T >::discreteInterval_t | 
Import discrete interval type.
| typedef boost::tuple<StableTimePoint, StableTimePoint, StableTimePoint> roboptim::trajectory::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::trajectory::TrajectorySumCost< T >::gradient_t | 
Import gradient type.
| typedef DerivableFunction roboptim::trajectory::TrajectorySumCost< T >::parent_t | 
Parent type.
| typedef T roboptim::trajectory::TrajectorySumCost< T >::trajectory_t | 
Trajectory type.
| typedef parent_t::vector_t roboptim::trajectory::TrajectorySumCost< T >::vector_t | 
Import vector type.
| roboptim::trajectory::TrajectorySumCost< T >::TrajectorySumCost | ( | const trajectory_t & | gamma, | 
| boost::shared_ptr< DerivableFunction > | cost, | ||
| const discreteStableTimePointInterval_t & | interval, | ||
| size_type | order = 1  | 
        ||
| ) | 
Constructor.
| gamma | Trajectory \(\Gamma\) along which the state is evaluated. | 
| cost | state cost: \(cost\). | 
| interval | Stable time points list where cost will be evaluated. | 
| order | order \(r\) of derivation. | 
| roboptim::trajectory::TrajectorySumCost< T >::~TrajectorySumCost | ( | ) |  [virtual] | 
        
| static StableTimePoint roboptim::trajectory::TrajectorySumCost< T >::getLowerBound | ( | const discreteStableTimePointInterval_t & | interval | ) |  [inline, static] | 
        
Get the lower bound of a discrete interval.
| interval | accessed discrete interval | 
| static StableTimePoint roboptim::trajectory::TrajectorySumCost< T >::getStep | ( | const discreteStableTimePointInterval_t & | interval | ) |  [inline, static] | 
        
Get the upper step of a discrete interval.
| interval | accessed discrete interval | 
| static StableTimePoint roboptim::trajectory::TrajectorySumCost< T >::getUpperBound | ( | const discreteStableTimePointInterval_t & | interval | ) |  [inline, static] | 
        
Get the upper bound of a discrete interval.
| interval | accessed discrete interval | 
| void roboptim::trajectory::TrajectorySumCost< T >::impl_compute | ( | result_ref | res, | 
| const_argument_ref | p | ||
| ) |  const [protected] | 
        
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
| void roboptim::trajectory::TrajectorySumCost< T >::impl_gradient | ( | gradient_ref | grad, | 
| const_argument_ref | p, | ||
| size_type | i | ||
| ) |  const [protected] | 
        
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
| static discreteStableTimePointInterval_t roboptim::trajectory::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::trajectory::TrajectorySumCost< T >::makeDiscreteInterval | ( | interval_t | interval, | 
| StableTimePoint | step | ||
| ) |  [inline, static] | 
        
Construct a discrete interval.
| interval | continuous interval | 
| step | discretization step | 
| TrajectorySumCost< T >::size_type roboptim::trajectory::TrajectorySumCost< T >::order | ( | ) | const |