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

#include <lpiecewisefunction.h>

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

Public Member Functions

 LPiecewiseFunction ()
 
 LPiecewiseFunction (bool deconstruct_pieces)
 
void setDeconstructPieces (bool value)
 
virtual ~LPiecewiseFunction ()
 
unsigned int findIndex (DT x) const
 
void appendHi (ALFunction< DT, CT > *newfun)
 
void appendHi_shifted (ALFunction< DT, CT > *newfun)
 
virtual CT f (DT x) const override
 
virtual DT limitHi () const override
 
virtual DT limitLo () const override
 
virtual void setLimits (DT lo, DT hi) override
 
virtual ALFunction< DT, CT > * create_derivative () override
 
virtual ALFunction< DT, CT > * clone () override
 
virtual void bound (const DT &xmin, const DT &xmax, CT &ymin, CT &ymax) override
 
- Public Member Functions inherited from adore::mad::ALFunction< DT, CT >
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

std::vector< ALFunction< DT, CT > * > m_data
 
unsigned int m_searchIndex
 
bool m_deconstruct_pieces
 

Detailed Description

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

LPiecewiseFunction - a function with upper and lower limit, which consists of multiple elements of general type ALFunction LPiecewiseFunction is intended as a container for multiple, different type subfunctions

Constructor & Destructor Documentation

◆ LPiecewiseFunction() [1/2]

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

◆ LPiecewiseFunction() [2/2]

template<typename DT , typename CT >
adore::mad::LPiecewiseFunction< DT, CT >::LPiecewiseFunction ( bool  deconstruct_pieces)
inline

◆ ~LPiecewiseFunction()

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

Member Function Documentation

◆ appendHi()

template<typename DT , typename CT >
void adore::mad::LPiecewiseFunction< DT, CT >::appendHi ( ALFunction< DT, CT > *  newfun)
inline

@TODO test for a certain precision / equality

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

◆ appendHi_shifted()

template<typename DT , typename CT >
void adore::mad::LPiecewiseFunction< DT, CT >::appendHi_shifted ( ALFunction< DT, CT > *  newfun)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ bound()

template<typename DT , typename CT >
virtual void adore::mad::LPiecewiseFunction< DT, CT >::bound ( const DT &  xmin,
const DT &  xmax,
CT &  ymin,
CT &  ymax 
)
inlineoverridevirtual

bound function values in the x-range defined by the hypercube between corner points lower left xmin and upper right xmax

Implements adore::mad::ALFunction< DT, CT >.

Here is the call graph for this function:

◆ clone()

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

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

Implements adore::mad::ALFunction< DT, CT >.

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

◆ create_derivative()

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

create a new function object, which is the derivative function

Implements adore::mad::ALFunction< DT, CT >.

Here is the call graph for this function:

◆ f()

template<typename DT , typename CT >
virtual CT adore::mad::LPiecewiseFunction< DT, CT >::f ( DT  x) const
inlineoverridevirtual

function evaluation returns y of codomain type CT for a value x of domain type DT

Implements adore::mad::ALFunction< DT, CT >.

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

◆ findIndex()

template<typename DT , typename CT >
unsigned int adore::mad::LPiecewiseFunction< DT, CT >::findIndex ( DT  x) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ limitHi()

template<typename DT , typename CT >
virtual DT adore::mad::LPiecewiseFunction< DT, CT >::limitHi ( ) const
inlineoverridevirtual

query upper limit of the domain

Implements adore::mad::ALFunction< DT, CT >.

Here is the caller graph for this function:

◆ limitLo()

template<typename DT , typename CT >
virtual DT adore::mad::LPiecewiseFunction< DT, CT >::limitLo ( ) const
inlineoverridevirtual

lower limit of the domain

Implements adore::mad::ALFunction< DT, CT >.

Here is the caller graph for this function:

◆ setDeconstructPieces()

template<typename DT , typename CT >
void adore::mad::LPiecewiseFunction< DT, CT >::setDeconstructPieces ( bool  value)
inline

◆ setLimits()

template<typename DT , typename CT >
virtual void adore::mad::LPiecewiseFunction< DT, CT >::setLimits ( DT  lo,
DT  hi 
)
inlineoverridevirtual

reduce or increase the limit of the function, without changing y

Implements adore::mad::ALFunction< DT, CT >.

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

Member Data Documentation

◆ m_data

template<typename DT , typename CT >
std::vector<ALFunction<DT, CT>*> adore::mad::LPiecewiseFunction< DT, CT >::m_data
private

◆ m_deconstruct_pieces

template<typename DT , typename CT >
bool adore::mad::LPiecewiseFunction< DT, CT >::m_deconstruct_pieces
private

◆ m_searchIndex

template<typename DT , typename CT >
unsigned int adore::mad::LPiecewiseFunction< DT, CT >::m_searchIndex
mutableprivate

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