CubbyFlow::NearestArraySampler< T, N > Class Template Referencefinal
N-D nearest 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 | |
NearestArraySampler ()=default | |
Default constructor. More... | |
NearestArraySampler (const ArrayView< const T, N > &view, const VectorType &gridSpacing, const VectorType &gridOrigin) | |
Constructs a sampler. More... | |
~NearestArraySampler ()=default | |
Default destructor. More... | |
NearestArraySampler (const NearestArraySampler &other) | |
Copy constructor. More... | |
NearestArraySampler (NearestArraySampler &&other) noexcept | |
Move constructor. More... | |
NearestArraySampler & | operator= (const NearestArraySampler &other) |
Copy assignment operator. More... | |
NearestArraySampler & | operator= (NearestArraySampler &&other) noexcept |
Move assignment operator. More... | |
T | operator() (const VectorType &pt) const |
Returns sampled value at point pt . More... | |
CoordIndexType | GetCoordinate (const VectorType &pt) const |
Returns the nearest array index for 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>
class CubbyFlow::NearestArraySampler< T, N >
N-D nearest array sampler class.
This class provides nearest 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>
using CubbyFlow::NearestArraySampler< T, N >::CoordIndexType = Vector<size_t, N> |
◆ ScalarType
template<typename T, size_t N>
using CubbyFlow::NearestArraySampler< T, N >::ScalarType = typename GetScalarType<T>::value |
◆ VectorType
template<typename T, size_t N>
using CubbyFlow::NearestArraySampler< T, N >::VectorType = Vector<ScalarType, N> |
Constructor & Destructor Documentation
◆ NearestArraySampler() [1/4]
template<typename T, size_t N>
|
default |
Default constructor.
◆ NearestArraySampler() [2/4]
template<typename T, size_t N>
|
explicit |
Constructs a sampler.
- Parameters
-
[in] view The array view. [in] gridSpacing The grid spacing. [in] gridOrigin The grid origin.
◆ ~NearestArraySampler()
template<typename T, size_t N>
|
default |
Default destructor.
◆ NearestArraySampler() [3/4]
template<typename T, size_t N>
CubbyFlow::NearestArraySampler< T, N >::NearestArraySampler | ( | const NearestArraySampler< T, N > & | other | ) |
Copy constructor.
◆ NearestArraySampler() [4/4]
template<typename T, size_t N>
|
noexcept |
Move constructor.
Member Function Documentation
◆ Functor()
template<typename T , size_t N>
std::function< T(const typename NearestArraySampler< T, N >::VectorType &)> CubbyFlow::NearestArraySampler< T, N >::Functor | ( | ) | const |
Returns a std::function object that wraps this instance.
◆ GetCoordinate()
template<typename T , size_t N>
NearestArraySampler< T, N >::CoordIndexType CubbyFlow::NearestArraySampler< T, N >::GetCoordinate | ( | const VectorType & | pt | ) | const |
Returns the nearest array index for point pt
.
◆ operator()()
template<typename T , size_t N>
T CubbyFlow::NearestArraySampler< T, N >::operator() | ( | const VectorType & | pt | ) | const |
Returns sampled value at point pt
.
◆ operator=() [1/2]
template<typename T , size_t N>
NearestArraySampler< T, N > & CubbyFlow::NearestArraySampler< T, N >::operator= | ( | const NearestArraySampler< T, N > & | other | ) |
Copy assignment operator.
◆ operator=() [2/2]
template<typename T , size_t N>
|
noexcept |
Move assignment operator.
The documentation for this class was generated from the following files:
- Core/Array/ArraySamplers.hpp
- Core/Array/ArraySamplers-Impl.hpp