Go to the documentation of this file.
7 #ifndef INCLUDE_JET_ARRAY_SAMPLERS1_H_
8 #define INCLUDE_JET_ARRAY_SAMPLERS1_H_
24 template <
typename T,
typename R>
28 std::is_floating_point<R>::value,
29 "Samplers only can be instantiated with floating point types");
75 template <
typename T,
typename R>
79 std::is_floating_point<R>::value,
80 "Samplers only can be instantiated with floating point types");
103 R x,
size_t* i0,
size_t* i1, T* weight0, T* weight1)
const;
127 template <
typename T,
typename R>
131 std::is_floating_point<R>::value,
132 "Samplers only can be instantiated with floating point types");
168 #include "detail/array_samplers1-inl.h"
170 #endif // INCLUDE_JET_ARRAY_SAMPLERS1_H_
std::function< T(R)> functor() const
Returns a funtion object that wraps this instance.
NearestArraySampler(const ConstArrayAccessor1< T > &accessor, R gridSpacing, R gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
Generic N-D nearest array sampler class.
Definition: array_samplers.h:22
1-D read-only array accessor class.
Definition: array_accessor1.h:184
std::function< T(R)> functor() const
Returns a funtion object that wraps this instance.
LinearArraySampler(const LinearArraySampler &other)
Copy constructor.
T operator()(R pt) const
Returns sampled value at point pt.
1-D nearest array sampler class.
Definition: array_samplers1.h:25
LinearArraySampler(const ConstArrayAccessor1< T > &accessor, R gridSpacing, R gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
T operator()(R pt) const
Returns sampled value at point pt.
Generic N-D cubic array sampler class.
Definition: array_samplers.h:50
NearestArraySampler(const NearestArraySampler &other)
Copy constructor.
Definition: advection_solver2.h:18
1-D cubic array sampler class.
Definition: array_samplers1.h:128
CubicArraySampler(const CubicArraySampler &other)
Copy constructor.
CubicArraySampler(const ConstArrayAccessor1< T > &accessor, R gridSpacing, R gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
std::function< T(R)> functor() const
Returns a funtion object that wraps this instance.
T operator()(R pt) const
Returns sampled value at point pt.
1-D linear array sampler class.
Definition: array_samplers1.h:76
Generic N-D linear array sampler class.
Definition: array_samplers.h:36
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.
void getCoordinate(R x, size_t *i) const
Returns the nearest array index for point x.