Helios++
Helios software for LiDAR simulations
fluxionum::ParametricClosestLesserSampleFunction< A, B > Class Template Reference
Inheritance diagram for fluxionum::ParametricClosestLesserSampleFunction< A, B >:
Collaboration diagram for fluxionum::ParametricClosestLesserSampleFunction< A, B >:

Public Member Functions

 ParametricClosestLesserSampleFunction (arma::Col< A > const &t, arma::Mat< B > const &y, size_t const i=0)
 ParametricClosestLesserSampleFunction default constructor. More...
 
ParametricClosestLesserSampleFunction< A, B > & operator= (ParametricClosestLesserSampleFunction< A, B > const &pclsf)
 Assignment reference operator.
 
arma::Col< B > eval (A const &tx) override
 Find the sample with closest lesser domain with respect to given \(t\) and return its known vector image \(\vec{y_i}\). More...
 
virtual void restart ()
 Restart the ParametricClosestLesserSampleFunction so it is at its initial state again (it is, at the first sample)
 
arma::Col< A > const & getT () const
 
arma::Mat< B > const & getY () const
 
size_t getCurrentSampleIndex () const
 
void setCurrentSampleIndex (size_t const i)
 
- Public Member Functions inherited from fluxionum::Function< A, arma::Col< B > >
 Function ()=default
 
arma::Col< B > operator() (A const &x)
 Evaluate the function \(f(x)=y\). More...
 

Protected Attributes

arma::Col< A > const & t
 The vector of sorted domain components \(\vec{t} = (t_1, \ldots, t_m)\).
 
arma::Mat< B > const & y
 The matrix of sorted image components \(\mathbf{Y} \in \mathbb{R}^{m \times n}\) such that \(\forall i,\, \vec{y}(t_{i}) = \vec{y_i}\), where \(\vec{y_i}\) is the \(i\)-th row of \(\mathbf{Y}\) as row vector.
 
size_t i
 The index of the current sorted domain sample.
 

Constructor & Destructor Documentation

◆ ParametricClosestLesserSampleFunction()

template<typename A , typename B >
fluxionum::ParametricClosestLesserSampleFunction< A, B >::ParametricClosestLesserSampleFunction ( arma::Col< A > const &  t,
arma::Mat< B > const &  y,
size_t const  i = 0 
)
inline

ParametricClosestLesserSampleFunction default constructor.

Parameters
iThe index of the initial domain sample. By default, it is assumed to be 0, it is the first domain sample.
See also
fluxionum::ParametricClosestLesserSampleFunction::t
fluxionum::ParametricClosestLesserSampleFunction::y
fluxionum::ParametricClosestLesserSampleFunction::i

Member Function Documentation

◆ eval()

template<typename A , typename B >
arma::Col<B> fluxionum::ParametricClosestLesserSampleFunction< A, B >::eval ( A const &  tx)
inlineoverridevirtual

Find the sample with closest lesser domain with respect to given \(t\) and return its known vector image \(\vec{y_i}\).

Parameters
txThe domain value which closest lesser sample must be found
Returns
\(\vec{y_i}\), it is the known vector image of the closest lesser sample

Implements fluxionum::Function< A, arma::Col< B > >.

◆ getCurrentSampleIndex()

template<typename A , typename B >
size_t fluxionum::ParametricClosestLesserSampleFunction< A, B >::getCurrentSampleIndex ( ) const
inline

◆ getT()

template<typename A , typename B >
arma::Col<A> const& fluxionum::ParametricClosestLesserSampleFunction< A, B >::getT ( ) const
inline

◆ getY()

template<typename A , typename B >
arma::Mat<B> const& fluxionum::ParametricClosestLesserSampleFunction< A, B >::getY ( ) const
inline

◆ setCurrentSampleIndex()

template<typename A , typename B >
void fluxionum::ParametricClosestLesserSampleFunction< A, B >::setCurrentSampleIndex ( size_t const  i)
inline

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