Loading...
Searching...
No Matches
CubbyFlow::LinearArraySampler< T, N > Class Template Referencefinal
N-D array sampler using linear interpolation. 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 > |
Static Public Attributes | |
| static constexpr size_t | FLAT_KERNEL_SIZE = 1 << N |
Detailed Description
N-D array sampler using linear interpolation.
This class provides linear sampling interface for a given N-D array.
- Template Parameters
-
T - The value type to sample. N - Dimension.
Member Typedef Documentation
◆ CoordIndexType
◆ ScalarType
| using CubbyFlow::LinearArraySampler< T, N >::ScalarType = typename GetScalarType<T>::value |
◆ VectorType
| using CubbyFlow::LinearArraySampler< T, N >::VectorType = Vector<ScalarType, N> |
Constructor & Destructor Documentation
◆ LinearArraySampler() [1/4]
|
default |
Default constructor.
◆ LinearArraySampler() [2/4]
|
explicit |
Constructs a sampler.
- Parameters
-
[in] view The array view. [in] gridSpacing The grid spacing. [in] gridOrigin The grid origin.
◆ ~LinearArraySampler()
|
default |
Default destructor.
◆ LinearArraySampler() [3/4]
| CubbyFlow::LinearArraySampler< T, N >::LinearArraySampler | ( | const LinearArraySampler< T, N > & | other | ) |
Copy constructor.
◆ LinearArraySampler() [4/4]
|
noexcept |
Move constructor.
Member Function Documentation
◆ Functor()
| std::function< T(const typename LinearArraySampler< T, N >::VectorType &)> CubbyFlow::LinearArraySampler< T, N >::Functor | ( | ) | const |
Returns a std::function instance that wraps this instance.
◆ GetCoordinatesAndGradientWeights()
| void CubbyFlow::LinearArraySampler< T, N >::GetCoordinatesAndGradientWeights | ( | const VectorType & | pt, |
| std::array< CoordIndexType, FLAT_KERNEL_SIZE > & | indices, | ||
| std::array< VectorType, FLAT_KERNEL_SIZE > & | weights | ||
| ) | const |
Returns the indices of points and their gradient of sampling weight for given point.
◆ GetCoordinatesAndWeights()
| void CubbyFlow::LinearArraySampler< T, N >::GetCoordinatesAndWeights | ( | const VectorType & | pt, |
| std::array< CoordIndexType, FLAT_KERNEL_SIZE > & | indices, | ||
| std::array< ScalarType, FLAT_KERNEL_SIZE > & | weights | ||
| ) | const |
Returns the indices of points and their sampling weight for given point.
◆ operator()()
| T CubbyFlow::LinearArraySampler< T, N >::operator() | ( | const VectorType & | pt | ) | const |
Returns sampled value at point pt.
◆ operator=() [1/2]
| LinearArraySampler< T, N > & CubbyFlow::LinearArraySampler< T, N >::operator= | ( | const LinearArraySampler< T, N > & | other | ) |
Copy assignment operator.
◆ operator=() [2/2]
|
noexcept |
Move assignment operator.
Member Data Documentation
◆ FLAT_KERNEL_SIZE
The documentation for this class was generated from the following files:
- Core/Array/ArraySamplers.hpp
- Core/Array/ArraySamplers-Impl.hpp
1.9.8