hermite  0.0.1
Public Member Functions | List of all members
hermite::HermiteSub< D > Class Template Reference

A hermite spline on a subinterval. More...

#include <hermite_sub.hpp>

Inheritance diagram for hermite::HermiteSub< D >:
Inheritance graph
[legend]
Collaboration diagram for hermite::HermiteSub< D >:
Collaboration graph
[legend]

Public Member Functions

 HermiteSub ()
 Default constructor. More...
 
 HermiteSub (const Vector< D > p0, const Vector< D > pf, const Vector< D > v0, const Vector< D > vf, const double lower, const double upper)
 Constructor. More...
 
 HermiteSub (const HermiteSub< D > &other)
 Copy constructor.
 
HermiteSub< D > & operator= (const HermiteSub< D > &other)
 Assignment operator.
 
 ~HermiteSub () override=default
 Destructor.
 
Vector< D > getPos (const double t) const override
 Gets position at a certain time. More...
 
Vector< D > getVel (const double t) const override
 Gets velocity at a certain time. More...
 
Vector< D > getAcc (const double t) const override
 Gets acceleration of the function at a certain time. More...
 
- Public Member Functions inherited from hermite::BaseInterpol< D >
virtual ~BaseInterpol ()=default
 Destructor.
 
virtual Vector< D > operator() (const double t) const
 Gets value of the interpolation function at a certain point. More...
 

Detailed Description

template<std::size_t D>
class hermite::HermiteSub< D >

A hermite spline on a subinterval.

Allows for two points on an arbitrary interval to be interpolated, not just at 0 and 1. It does this through an affline transformation.

Constructor & Destructor Documentation

◆ HermiteSub() [1/2]

template<std::size_t D>
hermite::HermiteSub< D >::HermiteSub ( )
inline

Default constructor.

Initializes lower bound to 0 and upper bound to 1, and the function is going to be zero for all input values.

◆ HermiteSub() [2/2]

template<std::size_t D>
hermite::HermiteSub< D >::HermiteSub ( const Vector< D >  p0,
const Vector< D >  pf,
const Vector< D >  v0,
const Vector< D >  vf,
const double  lower,
const double  upper 
)
inline

Constructor.

Parameters
p0Initial position vector
pfFinal position vector
v0Initial velocity vector
vfFinal velocity vector
lowerLower bound
upperUpper bound
Note
If lower >= upper, undefined behavior occurs.

Member Function Documentation

◆ getAcc()

template<std::size_t D>
Vector<D> hermite::HermiteSub< D >::getAcc ( const double  t) const
inlineoverridevirtual

Gets acceleration of the function at a certain time.

Note
If t is outside of the given interval, then it still calculates vector.
Parameters
tTime
Returns
Acceleration

Implements hermite::BaseInterpol< D >.

◆ getPos()

template<std::size_t D>
Vector<D> hermite::HermiteSub< D >::getPos ( const double  t) const
inlineoverridevirtual

Gets position at a certain time.

Same as calling operator()()

Note
If t is outside of the given interval, then it still calculates vector.
Parameters
tTime
Returns
Position

Implements hermite::BaseInterpol< D >.

◆ getVel()

template<std::size_t D>
Vector<D> hermite::HermiteSub< D >::getVel ( const double  t) const
inlineoverridevirtual

Gets velocity at a certain time.

Note
If t is outside of the given interval, then it still calculates vector.
Parameters
tTime
Returns
Velocity

Implements hermite::BaseInterpol< D >.


The documentation for this class was generated from the following file: