CubbyFlow::CubicArraySampler< T, N, CubicInterpolationOp > Class Template Referencefinal

N-D cubic array sampler class. More...

#include <Core/Array/ArraySamplers.hpp>

Public Types

using ScalarType = typename GetScalarType< T >::value
 
using VectorType = Vector< ScalarType, N >
 
using CoordIndexType = Vector< size_t, N >
 

Public Member Functions

 CubicArraySampler ()=default
 Default constructor. More...
 
 CubicArraySampler (const ArrayView< const T, N > &view, const VectorType &gridSpacing, const VectorType &gridOrigin)
 Constructs a sampler. More...
 
 ~CubicArraySampler ()=default
 Default destructor. More...
 
 CubicArraySampler (const CubicArraySampler &other)
 Copy constructor. More...
 
 CubicArraySampler (CubicArraySampler &&other) noexcept
 Move constructor. More...
 
CubicArraySampleroperator= (const CubicArraySampler &other)
 Copy assignment operator. More...
 
CubicArraySampleroperator= (CubicArraySampler &&other) noexcept
 Move assignment operator. More...
 
operator() (const VectorType &pt) const
 Returns sampled value at point pt. More...
 
std::function< T(const VectorType &)> Functor () const
 Returns a std::function object that wraps this instance. More...
 

Detailed Description

template<typename T, size_t N, typename CubicInterpolationOp>
class CubbyFlow::CubicArraySampler< T, N, CubicInterpolationOp >

N-D cubic array sampler class.

This class provides cubic sampling interface for a given N-D array.

Template Parameters
T- The value type to sample.
N- Dimension.

Member Typedef Documentation

◆ CoordIndexType

template<typename T , size_t N, typename CubicInterpolationOp >
using CubbyFlow::CubicArraySampler< T, N, CubicInterpolationOp >::CoordIndexType = Vector<size_t, N>

◆ ScalarType

template<typename T , size_t N, typename CubicInterpolationOp >
using CubbyFlow::CubicArraySampler< T, N, CubicInterpolationOp >::ScalarType = typename GetScalarType<T>::value

◆ VectorType

template<typename T , size_t N, typename CubicInterpolationOp >
using CubbyFlow::CubicArraySampler< T, N, CubicInterpolationOp >::VectorType = Vector<ScalarType, N>

Constructor & Destructor Documentation

◆ CubicArraySampler() [1/4]

template<typename T , size_t N, typename CubicInterpolationOp >
CubbyFlow::CubicArraySampler< T, N, CubicInterpolationOp >::CubicArraySampler ( )
default

Default constructor.

◆ CubicArraySampler() [2/4]

template<typename T , size_t N, typename CIOp >
CubbyFlow::CubicArraySampler< T, N, CIOp >::CubicArraySampler ( const ArrayView< const T, N > &  view,
const VectorType gridSpacing,
const VectorType gridOrigin 
)
explicit

Constructs a sampler.

Parameters
[in]viewThe array view.
[in]gridSpacingThe grid spacing.
[in]gridOriginThe grid origin.

◆ ~CubicArraySampler()

template<typename T , size_t N, typename CubicInterpolationOp >
CubbyFlow::CubicArraySampler< T, N, CubicInterpolationOp >::~CubicArraySampler ( )
default

Default destructor.

◆ CubicArraySampler() [3/4]

template<typename T , size_t N, typename CIOp >
CubbyFlow::CubicArraySampler< T, N, CIOp >::CubicArraySampler ( const CubicArraySampler< T, N, CubicInterpolationOp > &  other)

Copy constructor.

◆ CubicArraySampler() [4/4]

template<typename T , size_t N, typename CIOp >
CubbyFlow::CubicArraySampler< T, N, CIOp >::CubicArraySampler ( CubicArraySampler< T, N, CubicInterpolationOp > &&  other)
noexcept

Move constructor.

Member Function Documentation

◆ Functor()

template<typename T , size_t N, typename CIOp >
std::function< T(const typename CubicArraySampler< T, N, CIOp >::VectorType &)> CubbyFlow::CubicArraySampler< T, N, CIOp >::Functor ( ) const

Returns a std::function object that wraps this instance.

◆ operator()()

template<typename T , size_t N, typename CIOp >
T CubbyFlow::CubicArraySampler< T, N, CIOp >::operator() ( const VectorType pt) const

Returns sampled value at point pt.

◆ operator=() [1/2]

template<typename T , size_t N, typename CIOp >
CubicArraySampler< T, N, CIOp > & CubbyFlow::CubicArraySampler< T, N, CIOp >::operator= ( const CubicArraySampler< T, N, CubicInterpolationOp > &  other)

Copy assignment operator.

◆ operator=() [2/2]

template<typename T , size_t N, typename CIOp >
CubicArraySampler< T, N, CIOp > & CubbyFlow::CubicArraySampler< T, N, CIOp >::operator= ( CubicArraySampler< T, N, CubicInterpolationOp > &&  other)
noexcept

Move assignment operator.


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