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

Piecewise function. More...

#include <Func.h>

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

Public Member Functions

 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 Member Functions

void checkArg (double t) const
 Check argument of function. More...
 

Protected Attributes

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...
 

Detailed Description

template<class T>
class TrajColl::PiecewiseFunc< T >

Piecewise function.

Template Parameters
Tfunction value type

Definition at line 51 of file Func.h.

Constructor & Destructor Documentation

◆ PiecewiseFunc()

template<class T >
TrajColl::PiecewiseFunc< T >::PiecewiseFunc ( )
inline

Constructor.

Definition at line 55 of file Func.h.

Member Function Documentation

◆ appendFunc()

template<class T >
void TrajColl::PiecewiseFunc< T >::appendFunc ( double  t,
std::shared_ptr< Func< T >>  func 
)
inline

Add function.

Parameters
tupper bound of domain
funcfunction

Definition at line 114 of file Func.h.

◆ checkArg()

template<class T >
void TrajColl::PiecewiseFunc< T >::checkArg ( double  t) const
inlineprotected

Check argument of function.

Parameters
tarugment of function

Definition at line 131 of file Func.h.

◆ clearFuncs()

template<class T >
void TrajColl::PiecewiseFunc< T >::clearFuncs ( )
inline

Clear function.

Definition at line 104 of file Func.h.

◆ derivative()

template<class T >
virtual T TrajColl::PiecewiseFunc< T >::derivative ( double  t,
int  order = 1 
) const
inlineoverridevirtual

Evaluate function derivative value.

Parameters
tarugment of function
orderderivative order

Implements TrajColl::Func< T >.

Reimplemented in TrajColl::CubicHermiteSpline< T >.

Definition at line 71 of file Func.h.

◆ domainLowerLimit()

template<class T >
virtual double TrajColl::PiecewiseFunc< T >::domainLowerLimit ( ) const
inlineoverridevirtual

Get lower limit of domain.

Reimplemented from TrajColl::Func< T >.

Definition at line 88 of file Func.h.

◆ domainUpperLimit()

template<class T >
virtual double TrajColl::PiecewiseFunc< T >::domainUpperLimit ( ) const
inlineoverridevirtual

Get upper limit of domain.

Reimplemented from TrajColl::Func< T >.

Definition at line 94 of file Func.h.

◆ index()

template<class T >
virtual size_t TrajColl::PiecewiseFunc< T >::index ( double  t) const
inlinevirtual

Get the index of piecewise functions.

Parameters
tarugment of function

Definition at line 81 of file Func.h.

◆ operator()()

template<class T >
virtual T TrajColl::PiecewiseFunc< T >::operator() ( double  t) const
inlineoverridevirtual

Evaluate function value.

Parameters
tarugment of function

Implements TrajColl::Func< T >.

Reimplemented in TrajColl::CubicHermiteSpline< T >.

Definition at line 60 of file Func.h.

◆ setDomainLowerLimit()

template<class T >
void TrajColl::PiecewiseFunc< T >::setDomainLowerLimit ( double  t)
inline

Set lower limit of domain.

Parameters
tlower limit of domain

Definition at line 122 of file Func.h.

Member Data Documentation

◆ funcs_

template<class T >
std::map<double, std::shared_ptr<Func<T> > > TrajColl::PiecewiseFunc< T >::funcs_
protected

Map of upper bound of domain and function.

Definition at line 143 of file Func.h.

◆ tLowerLimit_

template<class T >
double TrajColl::PiecewiseFunc< T >::tLowerLimit_ = std::numeric_limits<double>::lowest()
protected

Lower limit of domain of this function.

Definition at line 146 of file Func.h.


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