Jet
v1.3.3
|
1-D linear array sampler class. More...
#include <jet/array_samplers1.h>
Public Member Functions | |
LinearArraySampler (const ConstArrayAccessor1< T > &accessor, R gridSpacing, R gridOrigin) | |
Constructs a sampler using array accessor, spacing between the elements, and the position of the first array element. More... | |
LinearArraySampler (const LinearArraySampler &other) | |
Copy constructor. More... | |
T | operator() (R pt) const |
Returns sampled value at point pt . More... | |
void | getCoordinatesAndWeights (R x, size_t *i0, size_t *i1, T *weight0, T *weight1) const |
Returns the indices of points and their sampling weight for given point. More... | |
std::function< T(R)> | functor () const |
Returns a funtion object that wraps this instance. More... | |
1-D linear array sampler class.
This class provides linear sampling interface for a given 1-D array.
T | - The value type to sample. |
R | - The real number type. |
|
explicit |
Constructs a sampler using array accessor, spacing between the elements, and the position of the first array element.
[in] | accessor | The array accessor. |
[in] | gridSpacing | The grid spacing. |
[in] | gridOrigin | The grid origin. |
jet::LinearArraySampler< T, R, 1 >::LinearArraySampler | ( | const LinearArraySampler< T, R, 1 > & | other | ) |
Copy constructor.
std::function<T(R)> jet::LinearArraySampler< T, R, 1 >::functor | ( | ) | const |
Returns a funtion object that wraps this instance.
void jet::LinearArraySampler< T, R, 1 >::getCoordinatesAndWeights | ( | R | x, |
size_t * | i0, | ||
size_t * | i1, | ||
T * | weight0, | ||
T * | weight1 | ||
) | const |
Returns the indices of points and their sampling weight for given point.
T jet::LinearArraySampler< T, R, 1 >::operator() | ( | R | pt | ) | const |
Returns sampled value at point pt
.