trajectory_collection
Public Member Functions | Protected Attributes | List of all members
TrajColl::CubicSpline< T > Class Template Reference

Cubic spline. More...

#include <CubicSpline.h>

Inheritance diagram for TrajColl::CubicSpline< T >:
Inheritance graph
[legend]
Collaboration diagram for TrajColl::CubicSpline< T >:
Collaboration graph
[legend]

Public Member Functions

 CubicSpline (int dim, const BoundaryConstraint< T > &bcStart, const BoundaryConstraint< T > &bcEnd, const std::map< double, T > &points={})
 Constructor. More...
 
const std::map< double, T > & points () const noexcept
 Access points. More...
 
void clearPoints ()
 Clear points. More...
 
void appendPoint (const std::pair< double, T > &point)
 Add point. More...
 
void calcCoeff ()
 Calculate coefficients. More...
 
- Public Member Functions inherited from TrajColl::PiecewiseFunc< T >
 PiecewiseFunc ()
 Constructor. More...
 
virtual T operator() (double t) const override
 Evaluate function value. More...
 
virtual T derivative (double t, int order=1) const override
 Evaluate function derivative value. More...
 
virtual size_t index (double t) const
 Get the index of piecewise functions. More...
 
virtual double domainLowerLimit () const override
 Get lower limit of domain. More...
 
virtual double domainUpperLimit () const override
 Get upper limit of domain. More...
 
void clearFuncs ()
 Clear function. More...
 
void appendFunc (double t, std::shared_ptr< Func< T >> func)
 Add function. More...
 
void setDomainLowerLimit (double t)
 Set lower limit of domain. More...
 
- Public Member Functions inherited from TrajColl::Func< T >
 Func ()
 Constructor. More...
 

Protected Attributes

int dim_
 Dimension of value. More...
 
BoundaryConstraint< T > bcStart_
 Boundary constraint of start point. More...
 
BoundaryConstraint< T > bcEnd_
 Boundary constraint of end point. More...
 
std::map< double, T > points_
 Way points. More...
 
- Protected Attributes inherited from TrajColl::PiecewiseFunc< T >
std::map< double, std::shared_ptr< Func< T > > > funcs_
 Map of upper bound of domain and function. More...
 
double tLowerLimit_ = std::numeric_limits<double>::lowest()
 Lower limit of domain of this function. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TrajColl::PiecewiseFunc< T >
void checkArg (double t) const
 Check argument of function. More...
 

Detailed Description

template<class T>
class TrajColl::CubicSpline< T >

Cubic spline.

Template Parameters
Tvalue type

Definition at line 42 of file CubicSpline.h.

Constructor & Destructor Documentation

◆ CubicSpline()

template<class T >
TrajColl::CubicSpline< T >::CubicSpline ( int  dim,
const BoundaryConstraint< T > &  bcStart,
const BoundaryConstraint< T > &  bcEnd,
const std::map< double, T > &  points = {} 
)
inline

Constructor.

Parameters
dimdimension of value
bcStartboundary constraint of start point
bcEndboundary constraint of end point
pointsway points

Definition at line 51 of file CubicSpline.h.

Member Function Documentation

◆ appendPoint()

template<class T >
void TrajColl::CubicSpline< T >::appendPoint ( const std::pair< double, T > &  point)
inline

Add point.

Parameters
pointway point

Definition at line 74 of file CubicSpline.h.

◆ calcCoeff()

template<class T >
void TrajColl::CubicSpline< T >::calcCoeff ( )
inline

Calculate coefficients.

See https://academiccommons.columbia.edu/doi/10.7916/D82Z1DMQ for the algorithm

Definition at line 83 of file CubicSpline.h.

◆ clearPoints()

template<class T >
void TrajColl::CubicSpline< T >::clearPoints ( )
inline

Clear points.

Definition at line 66 of file CubicSpline.h.

◆ points()

template<class T >
const std::map<double, T>& TrajColl::CubicSpline< T >::points ( ) const
inlinenoexcept

Access points.

Definition at line 60 of file CubicSpline.h.

Member Data Documentation

◆ bcEnd_

template<class T >
BoundaryConstraint<T> TrajColl::CubicSpline< T >::bcEnd_
protected

Boundary constraint of end point.

Definition at line 219 of file CubicSpline.h.

◆ bcStart_

template<class T >
BoundaryConstraint<T> TrajColl::CubicSpline< T >::bcStart_
protected

Boundary constraint of start point.

Definition at line 216 of file CubicSpline.h.

◆ dim_

template<class T >
int TrajColl::CubicSpline< T >::dim_
protected

Dimension of value.

Definition at line 213 of file CubicSpline.h.

◆ points_

template<class T >
std::map<double, T> TrajColl::CubicSpline< T >::points_
protected

Way points.

Definition at line 222 of file CubicSpline.h.


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