Helios++
Helios software for LiDAR simulations
|
Closest lesser sample function. More...
#include <ClosestLesserSampleFunction.h>
Public Member Functions | |
ClosestLesserSampleFunction (arma::Col< A > const &t, arma::Col< B > const &y, size_t const i=0) | |
ClosestLesserSampleFunction default constructor. More... | |
ClosestLesserSampleFunction< A, B > & | operator= (ClosestLesserSampleFunction< A, B > const &clsf) |
Assignment reference operator. | |
B | eval (A const &tx) override |
Find the sample with closest lesser domain with respect to given \(t\) and return its known image \(y_i\). More... | |
virtual void | restart () |
Restart the ClosestLesserSampleFunction so it is at its initial state again (it is, at the first sample) | |
arma::Col< A > const & | getT () const |
arma::Col< B > const & | getY () const |
size_t | getCurrentSampleIndex () const |
void | setCurrentSampleIndex (size_t const i) |
![]() | |
Function ()=default | |
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::Col< B > const & | y |
The vector of sorted image components \(\vec{y} = (y_1, \ldots, y_m)\) such that \(\forall i,\, y(t_{i}) = y_i\). | |
size_t | i |
The index of the current sorted domain sample. | |
Closest lesser sample function.
The ClosestLesserSampleFunction must have a vector of sorted domain components such that \(\forall i,\, t_{i+1} > t_{i}\). Also, for each \(t_i\) there must exist a known \(y_i\) such that \(y(t_{i}) = y_i\).
For the sake of efficiency, the ClosestLesserSampleFunction assumes that the value of \(t\) is going to be queried in an unidirectional forward sense. When querying values in a backward sense, result integrity is guaranteed but it might be at the expenses of performance.
|
inline |
ClosestLesserSampleFunction default constructor.
i | The index of the initial domain sample. By default, it is assumed to be 0, it is the first domain sample. |
|
inlineoverridevirtual |
Find the sample with closest lesser domain with respect to given \(t\) and return its known image \(y_i\).
tx | The domain value which closest lesser sample must be found |
Implements fluxionum::Function< A, B >.
|
inline |
|
inline |
|
inline |
|
inline |