Go to the documentation of this file.
7 #ifndef INCLUDE_JET_ARRAY_SAMPLERS2_H_
8 #define INCLUDE_JET_ARRAY_SAMPLERS2_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<Point2UI, 4>* indices,
106 std::array<R, 4>* weights)
const;
112 std::array<Point2UI, 4>* 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_samplers2-inl.h"
181 #endif // INCLUDE_JET_ARRAY_SAMPLERS2_H_
2-D point class.
Definition: point2.h:23
Generic N-D nearest array sampler class.
Definition: array_samplers.h:22
T operator()(const Vector2< R > &pt) const
Returns sampled value at point pt.
std::function< T(const Vector2< R > &)> functor() const
Returns a funtion object that wraps this instance.
CubicArraySampler(const CubicArraySampler &other)
Copy constructor.
void getCoordinate(const Vector2< R > &pt, Point2UI *index) const
Returns the nearest array index for point x.
T operator()(const Vector2< R > &pt) const
Returns sampled value at point pt.
Generic N-D cubic array sampler class.
Definition: array_samplers.h:50
NearestArraySampler(const ConstArrayAccessor2< T > &accessor, const Vector2< R > &gridSpacing, const Vector2< R > &gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
std::function< T(const Vector2< R > &)> functor() const
Returns a funtion object that wraps this instance.
2-D linear array sampler class.
Definition: array_samplers2.h:77
2-D cubic array sampler class.
Definition: array_samplers2.h:139
T operator()(const Vector2< R > &pt) const
Returns sampled value at point pt.
Definition: advection_solver2.h:18
2-D read-only array accessor class.
Definition: array_accessor2.h:261
2-D vector class.
Definition: vector2.h:24
std::function< T(const Vector2< R > &)> functor() const
Returns a funtion object that wraps this instance.
void getCoordinatesAndWeights(const Vector2< R > &pt, std::array< Point2UI, 4 > *indices, std::array< R, 4 > *weights) const
Returns the indices of points and their sampling weight for given point.
2-D nearest array sampler class.
Definition: array_samplers2.h:26
void getCoordinatesAndGradientWeights(const Vector2< R > &pt, std::array< Point2UI, 4 > *indices, std::array< Vector2< R >, 4 > *weights) const
LinearArraySampler(const ConstArrayAccessor2< T > &accessor, const Vector2< R > &gridSpacing, const Vector2< R > &gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
Generic N-D linear array sampler class.
Definition: array_samplers.h:36
CubicArraySampler(const ConstArrayAccessor2< T > &accessor, const Vector2< R > &gridSpacing, const Vector2< R > &gridOrigin)
Constructs a sampler using array accessor, spacing between the elements, and the position of the firs...
LinearArraySampler(const LinearArraySampler &other)
Copy constructor.
NearestArraySampler(const NearestArraySampler &other)
Copy constructor.