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

#include <alfunction.h>

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

Public Member Functions

 LLinearFunction (DT x0, DT x1, CT y0, CT dydx)
 
 LLinearFunction (DT x0, DT x1, CT y0, CT dydx, DT xLo, DT xHi)
 
virtual ~LLinearFunction ()
 
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 void bound (const DT &xmin, const DT &xmax, CT &ymin, CT &ymax) override
 
virtual ALFunction< DT, CT > * clone () 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

DT m_x0
 
DT m_x1
 
DT m_xLo
 
DT m_xHi
 
CT m_y0
 
CT m_dydx
 

Detailed Description

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

LLinearFunction - a plain old straight line between two points

Constructor & Destructor Documentation

◆ LLinearFunction() [1/2]

template<typename DT , typename CT >
adore::mad::LLinearFunction< DT, CT >::LLinearFunction ( DT  x0,
DT  x1,
CT  y0,
CT  dydx 
)
inline

◆ LLinearFunction() [2/2]

template<typename DT , typename CT >
adore::mad::LLinearFunction< DT, CT >::LLinearFunction ( DT  x0,
DT  x1,
CT  y0,
CT  dydx,
DT  xLo,
DT  xHi 
)
inline

◆ ~LLinearFunction()

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

Member Function Documentation

◆ bound()

template<typename DT , typename CT >
virtual void adore::mad::LLinearFunction< 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::LLinearFunction< DT, CT >::clone ( )
inlineoverridevirtual

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

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

◆ create_derivative()

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

create a new function object, which is the derivative function

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

◆ f()

template<typename DT , typename CT >
virtual CT adore::mad::LLinearFunction< 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 caller graph for this function:

◆ limitHi()

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

query upper limit of the domain

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

◆ limitLo()

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

lower limit of the domain

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

◆ setLimits()

template<typename DT , typename CT >
virtual void adore::mad::LLinearFunction< 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 >.

Member Data Documentation

◆ m_dydx

template<typename DT , typename CT >
CT adore::mad::LLinearFunction< DT, CT >::m_dydx
private

◆ m_x0

template<typename DT , typename CT >
DT adore::mad::LLinearFunction< DT, CT >::m_x0
private

◆ m_x1

template<typename DT , typename CT >
DT adore::mad::LLinearFunction< DT, CT >::m_x1
private

◆ m_xHi

template<typename DT , typename CT >
DT adore::mad::LLinearFunction< DT, CT >::m_xHi
private

◆ m_xLo

template<typename DT , typename CT >
DT adore::mad::LLinearFunction< DT, CT >::m_xLo
private

◆ m_y0

template<typename DT , typename CT >
CT adore::mad::LLinearFunction< DT, CT >::m_y0
private

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