Takes a vector or argument and differentiate it. More...
#include <roboptim/trajectory/vector-interpolation.hh>
  
 Public Types | |
| typedef boost::shared_ptr < VectorInterpolation >  | VectorInterpolationShPtr_t | 
Public Member Functions | |
| ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS (Trajectory< 3 >) | |
| ROBOPTIM_IMPLEMENT_CLONE (VectorInterpolation) | |
| VectorInterpolation (const_vector_ref x, size_type outputSize, value_type dt) | |
| Vector interpolation constructor.   | |
| ~VectorInterpolation () | |
| VectorInterpolation (const VectorInterpolation &vi) | |
| void | setParameters (const_vector_ref) | 
| Store parameters and update coefficients.   | |
| size_type | numFrames () const | 
| jacobian_t | variationConfigWrtParam (double t) const | 
| Get the variation of a configuration with respect to parameter vector.   | |
| jacobian_t | variationDerivWrtParam (double t, size_type order) const | 
| Get the variation of a derivative with respect to parameter vector.   | |
| value_type | singularPointAtRank (size_type rank) const | 
| Get singular point at given rank.   | |
| vector_t | derivBeforeSingularPoint (size_type rank, size_type order) const | 
| Get left limit value of derivative at given singular point.   | |
| vector_t | derivAfterSingularPoint (size_type rank, size_type order) const | 
| Get right limit value of derivative at given singular point.   | |
| jacobian_t | variationConfigWrtParam (StableTimePoint tp) const | 
| jacobian_t | variationDerivWrtParam (StableTimePoint tp, size_type order) const | 
| boost::shared_ptr < VectorInterpolation >  | trim (size_type start, size_type length) const | 
| Instantiate a trajectory corresponding to a sub-part of this trajectory.   | |
Protected Member Functions | |
| void | impl_compute (result_ref result, double t) const | 
| void | impl_derivative (derivative_ref derivative, double argument, size_type order=1) const | 
| void | impl_derivative (derivative_ref g, StableTimePoint, size_type order) const | 
| Trajectory< 3 > * | resize (interval_t timeRange) const | 
| Clone and resize a trajectory.   | |
Takes a vector or argument and differentiate it.
It is common to have an optimization vector where a pattern is repeated:
[x_0^0 ... x_N^0 ... x_0^M x_N^M]
The pattern is here of length N and repeated M times.
By using numerical interpolation, it is possible to differentiate this pattern.
A classical example are trajectories.
| typedef boost::shared_ptr<VectorInterpolation> roboptim::trajectory::VectorInterpolation::VectorInterpolationShPtr_t | 
| roboptim::trajectory::VectorInterpolation::VectorInterpolation | ( | const_vector_ref | x, | 
| size_type | outputSize, | ||
| value_type | dt | ||
| ) |  [inline, explicit] | 
        
Vector interpolation constructor.
| std::runtime_error | 
| roboptim::trajectory::VectorInterpolation::VectorInterpolation | ( | const VectorInterpolation & | vi | ) |  [inline] | 
        
| VectorInterpolation::vector_t roboptim::trajectory::VectorInterpolation::derivAfterSingularPoint | ( | size_type | rank, | 
| size_type | order | ||
| ) |  const [inline, virtual] | 
        
Get right limit value of derivative at given singular point.
| rank | rank of the singular points. | 
| order | order of derivation. | 
| derivative | Limit of the derivative at singular point for decreasing parameter values. | 
Implements roboptim::trajectory::Trajectory< 3 >.
| VectorInterpolation::vector_t roboptim::trajectory::VectorInterpolation::derivBeforeSingularPoint | ( | size_type | rank, | 
| size_type | order | ||
| ) |  const [inline, virtual] | 
        
Get left limit value of derivative at given singular point.
| rank | rank of the singular points. | 
| order | order of derivation. | 
Implements roboptim::trajectory::Trajectory< 3 >.
| void roboptim::trajectory::VectorInterpolation::impl_compute | ( | result_ref | result, | 
| double | t | ||
| ) |  const [inline, protected] | 
        
| void roboptim::trajectory::VectorInterpolation::impl_derivative | ( | derivative_ref | derivative, | 
| double | argument, | ||
| size_type | order = 1  | 
        ||
| ) |  const [inline, protected] | 
        
References roboptim::trajectory::Trajectory< 3 >::operator()(), and roboptim::trajectory::Trajectory< 3 >::parameters().
Referenced by impl_derivative().
| void roboptim::trajectory::VectorInterpolation::impl_derivative | ( | derivative_ref | g, | 
| StableTimePoint | stp, | ||
| size_type | order | ||
| ) |  const [inline, protected, virtual] | 
        
Implements roboptim::trajectory::Trajectory< 3 >.
References roboptim::trajectory::StableTimePoint::getTime(), and impl_derivative().
| VectorInterpolation::size_type roboptim::trajectory::VectorInterpolation::numFrames | ( | ) |  const [inline] | 
        
References roboptim::trajectory::Trajectory< 3 >::parameters().
Referenced by trim().
| Trajectory< 3 > * roboptim::trajectory::VectorInterpolation::resize | ( | interval_t | timeRange | ) |  const [inline, protected, virtual] | 
        
Clone and resize a trajectory.
Implements roboptim::trajectory::Trajectory< 3 >.
| roboptim::trajectory::VectorInterpolation::ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS | ( | Trajectory< 3 > | ) | 
| void roboptim::trajectory::VectorInterpolation::setParameters | ( | const_vector_ref | x | ) |  [inline, virtual] | 
        
Store parameters and update coefficients.
| vector_t | vector of parameters. | 
| std::runtime_error | 
Reimplemented from roboptim::trajectory::Trajectory< 3 >.
References roboptim::trajectory::Trajectory< 3 >::parameters(), and roboptim::trajectory::Trajectory< 3 >::singularPoints_.
Referenced by VectorInterpolation().
| VectorInterpolation::value_type roboptim::trajectory::VectorInterpolation::singularPointAtRank | ( | size_type | rank | ) |  const [inline, virtual] | 
        
Get singular point at given rank.
Implements roboptim::trajectory::Trajectory< 3 >.
| boost::shared_ptr< VectorInterpolation > roboptim::trajectory::VectorInterpolation::trim | ( | size_type | start, | 
| size_type | length | ||
| ) |  const [inline] | 
        
Instantiate a trajectory corresponding to a sub-part of this trajectory.
This function can be called to exclude some frames at the beginning and/or the end of the trajectory.
| [in] | start | starting frame (0 is the first frame) | 
| [out] | length | length of the output trajectory (0 means maximum length) | 
References numFrames(), and roboptim::trajectory::Trajectory< 3 >::parameters().
| VectorInterpolation::jacobian_t roboptim::trajectory::VectorInterpolation::variationConfigWrtParam | ( | double | t | ) |  const [inline, virtual] | 
        
Get the variation of a configuration with respect to parameter vector.
| t | value \(t\) in the definition interval. | 
\[\frac{\partial\Gamma_{\textbf{p}}(t)}{\partial\textbf{p}}\]
Implements roboptim::trajectory::Trajectory< 3 >.
References variationDerivWrtParam().
| VectorInterpolation::jacobian_t roboptim::trajectory::VectorInterpolation::variationConfigWrtParam | ( | StableTimePoint | tp | ) |  const [inline, virtual] | 
        
Implements roboptim::trajectory::Trajectory< 3 >.
References variationDerivWrtParam().
| VectorInterpolation::jacobian_t roboptim::trajectory::VectorInterpolation::variationDerivWrtParam | ( | double | t, | 
| size_type | order | ||
| ) |  const [inline, virtual] | 
        
Get the variation of a derivative with respect to parameter vector.
| t | value \(t\) in the definition interval. | 
| order | order \(r\) of the derivative. | 
\[ \frac{\partial}{\partial\textbf{p}} \left(\frac{d^r\Gamma_{\textbf{p}}}{dt^r}(t)\right) \]
Implements roboptim::trajectory::Trajectory< 3 >.
References roboptim::trajectory::Trajectory< 3 >::parameters().
Referenced by variationConfigWrtParam().
| VectorInterpolation::jacobian_t roboptim::trajectory::VectorInterpolation::variationDerivWrtParam | ( | StableTimePoint | tp, | 
| size_type | order | ||
| ) |  const [inline, virtual] | 
        
Implements roboptim::trajectory::Trajectory< 3 >.
References roboptim::trajectory::StableTimePoint::getTime().