ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::mad::ALFunction< DT, CT > Class Template Referenceabstract

#include <alfunction.h>

Inheritance diagram for adore::mad::ALFunction< DT, CT >:
Inheritance graph
Collaboration diagram for adore::mad::ALFunction< DT, CT >:
Collaboration graph

Public Member Functions

virtual void setLimits (DT lo, DT hi)=0
 
virtual DT limitHi () const =0
 
virtual DT limitLo () const =0
 
virtual CT f (DT x) const =0
 
virtual ALFunction< DT, CT > * clone ()=0
 
virtual ALFunction< DT, CT > * create_derivative ()=0
 
virtual void bound (const DT &xmin, const DT &xmax, CT &ymin, CT &ymax)=0
 
virtual ~ALFunction ()
 
 ALFunction ()
 
const CT operator() (DT x) const
 
bool isInDomain (DT x)
 
CT f_bounded (DT x)
 
virtual void f (DT *xvec, CT *yvec, unsigned int count) const
 
void bound (CT &ymin, CT &ymax)
 
void invalidateCachedBounds ()
 

Private Attributes

CT cached_ymin
 
CT cached_ymax
 
bool cached_bounds_valid
 

Detailed Description

template<typename DT, typename CT>
class adore::mad::ALFunction< DT, CT >

An abstract function with limits. f:DT->CT

Constructor & Destructor Documentation

◆ ~ALFunction()

template<typename DT , typename CT >
virtual adore::mad::ALFunction< DT, CT >::~ALFunction ( )
inlinevirtual

◆ ALFunction()

template<typename DT , typename CT >
adore::mad::ALFunction< DT, CT >::ALFunction ( )
inline

Member Function Documentation

◆ bound() [1/2]

◆ bound() [2/2]

template<typename DT , typename CT >
void adore::mad::ALFunction< DT, CT >::bound ( CT &  ymin,
CT &  ymax 
)
inline

bound function value on interval [ymin,ymax], using caching for bound computation

Here is the call graph for this function:

◆ clone()

template<typename DT , typename CT >
virtual ALFunction<DT, CT>* adore::mad::ALFunction< DT, CT >::clone ( )
pure virtual

create a copy of child class object - is used for function operations

Implemented in adore::mad::RotationFunction< T >, adore::mad::RotationFunction< T >::RotationFunctionPD, adore::mad::LSpiralFunction< T, M >, adore::mad::LPolynomialM< T, N, M >::OneDimension, adore::mad::LPolynomialM< T, N, M >, adore::mad::LPolynomialS< T, M >, adore::mad::LPiecewiseFunction< DT, CT >, adore::mad::LLinearPiecewiseFunctionA< T, N, k >, adore::mad::LLinearPiecewiseFunctionA< T, N, k >::OneDimension, adore::mad::LLinearPiecewiseFunctionM< T, n >, adore::mad::LLinearPiecewiseFunctionM< T, 3+M+1 >, adore::mad::LLinearPiecewiseFunctionM< double, 1 >, adore::mad::LLinearPiecewiseFunctionM< double, N+R >, adore::mad::LLinearPiecewiseFunctionM< double, 4 >, adore::mad::LLinearPiecewiseFunctionM< double, 3 >, adore::mad::LLinearPiecewiseFunctionM< double, 2 >, adore::mad::IntegratorChain< T, depth >, adore::mad::LHeading< T >, adore::mad::FunctionCombination_StackScalar< T >, adore::mad::FunctionCombination_Stack< T, Na, Nb >, adore::mad::FunctionCombination_Chain< DTa, CTa, DTb >, adore::mad::FunctionCombination_MultiplicationConst< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Multiplication_Matrix< T, N, M, K >, adore::mad::FunctionCombination_Multiplication< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Addition< DT, CT >, adore::mad::LLinearFunction< DT, CT >, adore::mad::LConstFun< DT, CT >, adore::mad::LLinearPiecewiseFunctionM< T, n >::OneDimension, adore::mad::LLinearPiecewiseFunctionS< T >, adore::mad::Curvature2d< d1, d2, T, nd >, adore::mad::PartialCurvatureDerivative2d< d1, d2, T, nd >, and adore::mad::FunctionModification_ReciprocalScalar< T >.

Here is the caller graph for this function:

◆ create_derivative()

template<typename DT , typename CT >
virtual ALFunction<DT, CT>* adore::mad::ALFunction< DT, CT >::create_derivative ( )
pure virtual

create a new function object, which is the derivative function

Implemented in adore::mad::RotationFunction< T >, adore::mad::RotationFunction< T >::RotationFunctionPD, adore::mad::LSpiralFunction< T, M >, adore::mad::LPolynomialM< T, N, M >::OneDimension, adore::mad::LPolynomialM< T, N, M >, adore::mad::LPolynomialS< T, M >, adore::mad::LPiecewiseFunction< DT, CT >, adore::mad::LLinearPiecewiseFunctionA< T, N, k >::OneDimension, adore::mad::LLinearPiecewiseFunctionA< T, N, k >, adore::mad::LLinearPiecewiseFunctionM< T, n >::OneDimension, adore::mad::LLinearPiecewiseFunctionM< T, n >, adore::mad::LLinearPiecewiseFunctionM< T, 3+M+1 >, adore::mad::LLinearPiecewiseFunctionM< double, 1 >, adore::mad::LLinearPiecewiseFunctionM< double, N+R >, adore::mad::LLinearPiecewiseFunctionM< double, 4 >, adore::mad::LLinearPiecewiseFunctionM< double, 3 >, adore::mad::LLinearPiecewiseFunctionM< double, 2 >, adore::mad::LLinearPiecewiseFunctionS< T >, adore::mad::IntegratorChain< T, depth >, adore::mad::LHeading< T >, adore::mad::FunctionCombination_StackScalar< T >, adore::mad::FunctionCombination_Stack< T, Na, Nb >, adore::mad::FunctionCombination_Chain< DTa, CTa, DTb >, adore::mad::FunctionCombination_MultiplicationConst< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Multiplication_Matrix< T, N, M, K >, adore::mad::FunctionCombination_Multiplication< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Addition< DT, CT >, adore::mad::LLinearFunction< DT, CT >, adore::mad::LConstFun< DT, CT >, adore::mad::Curvature2d< d1, d2, T, nd >, adore::mad::PartialCurvatureDerivative2d< d1, d2, T, nd >, and adore::mad::FunctionModification_ReciprocalScalar< T >.

Here is the caller graph for this function:

◆ f() [1/2]

template<typename DT , typename CT >
virtual void adore::mad::ALFunction< DT, CT >::f ( DT *  xvec,
CT *  yvec,
unsigned int  count 
) const
inlinevirtual

evaluate function at multiple points provided by array xvec

Parameters
xvecpoints in domain, which are evaluated, xvec length>= count
yvecarray for values of codomain, filled by function, length>= count
Here is the call graph for this function:

◆ f() [2/2]

◆ f_bounded()

template<typename DT , typename CT >
CT adore::mad::ALFunction< DT, CT >::f_bounded ( DT  x)
inline

a safe to use version of f(x), which enforces function bounds

Here is the call graph for this function:
Here is the caller graph for this function:

◆ invalidateCachedBounds()

template<typename DT , typename CT >
void adore::mad::ALFunction< DT, CT >::invalidateCachedBounds ( )
inline

clear the cache used in bound computation

◆ isInDomain()

template<typename DT , typename CT >
bool adore::mad::ALFunction< DT, CT >::isInDomain ( DT  x)
inline
Here is the call graph for this function:

◆ limitHi()

template<typename DT , typename CT >
virtual DT adore::mad::ALFunction< DT, CT >::limitHi ( ) const
pure virtual

query upper limit of the domain

Implemented in adore::mad::RotationFunction< T >, adore::mad::RotationFunction< T >::RotationFunctionPD, adore::mad::LSpiralFunction< T, M >, adore::mad::LPolynomialM< T, N, M >::OneDimension, adore::mad::LPolynomialM< T, N, M >, adore::mad::LPolynomialS< T, M >, adore::mad::LPiecewiseFunction< DT, CT >, adore::mad::LLinearPiecewiseFunctionA< T, N, k >::OneDimension, adore::mad::LLinearPiecewiseFunctionA< T, N, k >, adore::mad::LLinearPiecewiseFunctionM< T, n >::OneDimension, adore::mad::LLinearPiecewiseFunctionM< T, n >, adore::mad::LLinearPiecewiseFunctionM< T, 3+M+1 >, adore::mad::LLinearPiecewiseFunctionM< double, 1 >, adore::mad::LLinearPiecewiseFunctionM< double, N+R >, adore::mad::LLinearPiecewiseFunctionM< double, 4 >, adore::mad::LLinearPiecewiseFunctionM< double, 3 >, adore::mad::LLinearPiecewiseFunctionM< double, 2 >, adore::mad::LLinearPiecewiseFunctionS< T >, adore::mad::IntegratorChain< T, depth >, adore::mad::LHeading< T >, adore::mad::FunctionModification_ReciprocalScalar< T >, adore::mad::FunctionCombination_StackScalar< T >, adore::mad::FunctionCombination_Stack< T, Na, Nb >, adore::mad::FunctionCombination_Chain< DTa, CTa, DTb >, adore::mad::FunctionCombination_MultiplicationConst< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Multiplication_Matrix< T, N, M, K >, adore::mad::FunctionCombination_Multiplication< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Addition< DT, CT >, adore::mad::LLinearFunction< DT, CT >, and adore::mad::LConstFun< DT, CT >.

Here is the caller graph for this function:

◆ limitLo()

template<typename DT , typename CT >
virtual DT adore::mad::ALFunction< DT, CT >::limitLo ( ) const
pure virtual

lower limit of the domain

Implemented in adore::mad::RotationFunction< T >, adore::mad::RotationFunction< T >::RotationFunctionPD, adore::mad::LSpiralFunction< T, M >, adore::mad::LPolynomialM< T, N, M >::OneDimension, adore::mad::LPolynomialM< T, N, M >, adore::mad::LPolynomialS< T, M >, adore::mad::LPiecewiseFunction< DT, CT >, adore::mad::LLinearPiecewiseFunctionA< T, N, k >::OneDimension, adore::mad::LLinearPiecewiseFunctionA< T, N, k >, adore::mad::LLinearPiecewiseFunctionM< T, n >::OneDimension, adore::mad::LLinearPiecewiseFunctionM< T, n >, adore::mad::LLinearPiecewiseFunctionM< T, 3+M+1 >, adore::mad::LLinearPiecewiseFunctionM< double, 1 >, adore::mad::LLinearPiecewiseFunctionM< double, N+R >, adore::mad::LLinearPiecewiseFunctionM< double, 4 >, adore::mad::LLinearPiecewiseFunctionM< double, 3 >, adore::mad::LLinearPiecewiseFunctionM< double, 2 >, adore::mad::LLinearPiecewiseFunctionS< T >, adore::mad::IntegratorChain< T, depth >, adore::mad::LHeading< T >, adore::mad::FunctionModification_ReciprocalScalar< T >, adore::mad::FunctionCombination_StackScalar< T >, adore::mad::FunctionCombination_Stack< T, Na, Nb >, adore::mad::FunctionCombination_Chain< DTa, CTa, DTb >, adore::mad::FunctionCombination_MultiplicationConst< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Multiplication_Matrix< T, N, M, K >, adore::mad::FunctionCombination_Multiplication< DT, CT, CTa, CTb >, adore::mad::FunctionCombination_Addition< DT, CT >, adore::mad::LLinearFunction< DT, CT >, and adore::mad::LConstFun< DT, CT >.

Here is the caller graph for this function:

◆ operator()()

template<typename DT , typename CT >
const CT adore::mad::ALFunction< DT, CT >::operator() ( DT  x) const
inline
Here is the call graph for this function:

◆ setLimits()

Member Data Documentation

◆ cached_bounds_valid

template<typename DT , typename CT >
bool adore::mad::ALFunction< DT, CT >::cached_bounds_valid
private

◆ cached_ymax

template<typename DT , typename CT >
CT adore::mad::ALFunction< DT, CT >::cached_ymax
private

◆ cached_ymin

template<typename DT , typename CT >
CT adore::mad::ALFunction< DT, CT >::cached_ymin
private

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