Jet  v1.3.3
Public Member Functions | List of all members
jet::LinearArraySampler< T, R, 2 > Class Template Referencefinal

2-D linear array sampler class. More...

#include <jet/array_samplers2.h>

Public Member Functions

 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 first array element. More...
 
 LinearArraySampler (const LinearArraySampler &other)
 Copy constructor. More...
 
operator() (const Vector2< R > &pt) const
 Returns sampled value at point pt. More...
 
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. More...
 
void getCoordinatesAndGradientWeights (const Vector2< R > &pt, std::array< Point2UI, 4 > *indices, std::array< Vector2< R >, 4 > *weights) const
 
std::function< T(const Vector2< R > &)> functor () const
 Returns a funtion object that wraps this instance. More...
 

Detailed Description

template<typename T, typename R>
class jet::LinearArraySampler< T, R, 2 >

2-D linear array sampler class.

This class provides linear sampling interface for a given 2-D array.

Template Parameters
T- The value type to sample.
R- The real number type.

Constructor & Destructor Documentation

◆ LinearArraySampler() [1/2]

template<typename T , typename R >
jet::LinearArraySampler< T, R, 2 >::LinearArraySampler ( const ConstArrayAccessor2< T > &  accessor,
const Vector2< R > &  gridSpacing,
const Vector2< R > &  gridOrigin 
)
explicit

Constructs a sampler using array accessor, spacing between the elements, and the position of the first array element.

Parameters
[in]accessorThe array accessor.
[in]gridSpacingThe grid spacing.
[in]gridOriginThe grid origin.

◆ LinearArraySampler() [2/2]

template<typename T , typename R >
jet::LinearArraySampler< T, R, 2 >::LinearArraySampler ( const LinearArraySampler< T, R, 2 > &  other)

Copy constructor.

Member Function Documentation

◆ functor()

template<typename T , typename R >
std::function<T(const Vector2<R>&)> jet::LinearArraySampler< T, R, 2 >::functor ( ) const

Returns a funtion object that wraps this instance.

◆ getCoordinatesAndGradientWeights()

template<typename T , typename R >
void jet::LinearArraySampler< T, R, 2 >::getCoordinatesAndGradientWeights ( const Vector2< R > &  pt,
std::array< Point2UI, 4 > *  indices,
std::array< Vector2< R >, 4 > *  weights 
) const

Returns the indices of points and their gradient of sampling weight for given point.

◆ getCoordinatesAndWeights()

template<typename T , typename R >
void jet::LinearArraySampler< T, R, 2 >::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.

◆ operator()()

template<typename T , typename R >
T jet::LinearArraySampler< T, R, 2 >::operator() ( const Vector2< R > &  pt) const

Returns sampled value at point pt.


The documentation for this class was generated from the following file: