Go to the documentation of this file.
7 #ifndef INCLUDE_JET_ARRAY_SAMPLERS3_H_
8 #define INCLUDE_JET_ARRAY_SAMPLERS3_H_
25 template <
typename T,
typename R>
29 std::is_floating_point<R>::value,
30 "Samplers only can be instantiated with floating point types");
76 template <
typename T,
typename R>
80 std::is_floating_point<R>::value,
81 "Samplers only can be instantiated with floating point types");
105 std::array<Point3UI, 8>* indices,
106 std::array<R, 8>* weights)
const;
112 std::array<Point3UI, 8>* indices,
138 template <
typename T,
typename R>
142 std::is_floating_point<R>::value,
143 "Samplers only can be instantiated with floating point types");
179 #include "detail/array_samplers3-inl.h"
181 #endif // INCLUDE_JET_ARRAY_SAMPLERS3_H_
3-D read-only array accessor class.
Definition: array_accessor3.h:270
T operator()(const Vector3< R > &pt) const
Returns sampled value at point pt.
Generic N-D nearest array sampler class.
Definition: array_samplers.h:22
std::function< T(const Vector3< R > &)> functor() const
Returns a funtion object that wraps this instance.
LinearArraySampler(const ConstArrayAccessor3< T > &accessor, const Vector3< R > &gridSpacing, const Vector3< R > &gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
void getCoordinatesAndWeights(const Vector3< R > &pt, std::array< Point3UI, 8 > *indices, std::array< R, 8 > *weights) const
Returns the indices of points and their sampling weight for given point.
LinearArraySampler(const LinearArraySampler &other)
Copy constructor.
T operator()(const Vector3< R > &pt) const
Returns sampled value at point pt.
void getCoordinate(const Vector3< R > &pt, Point3UI *index) const
Returns the nearest array index for point x.
Generic N-D cubic array sampler class.
Definition: array_samplers.h:50
NearestArraySampler(const ConstArrayAccessor3< T > &accessor, const Vector3< R > &gridSpacing, const Vector3< R > &gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
CubicArraySampler(const ConstArrayAccessor3< T > &accessor, const Vector3< R > &gridSpacing, const Vector3< R > &gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
Definition: advection_solver2.h:18
2-D linear array sampler class.
Definition: array_samplers3.h:77
3-D cubic array sampler class.
Definition: array_samplers3.h:139
3-D point class.
Definition: point3.h:23
std::function< T(const Vector3< R > &)> functor() const
Returns a funtion object that wraps this instance.
T operator()(const Vector3< R > &pt) const
Returns sampled value at point pt.
void getCoordinatesAndGradientWeights(const Vector3< R > &pt, std::array< Point3UI, 8 > *indices, std::array< Vector3< R >, 8 > *weights) const
3-D vector class.
Definition: vector3.h:25
Generic N-D linear array sampler class.
Definition: array_samplers.h:36
NearestArraySampler(const NearestArraySampler &other)
Copy constructor.
std::function< T(const Vector3< R > &)> functor() const
Returns a funtion object that wraps this instance.
3-D nearest array sampler class.
Definition: array_samplers3.h:26
CubicArraySampler(const CubicArraySampler &other)
Copy constructor.