T2DInterpolator< T > Class Template Reference

The base class for 2D interpolators that use some kind of spacial convolution. More...

#include <mia/2d/interpolator.hh>

Public Types

typedef T2DDatafield< typename coeff_map< T >::coeff_type > TCoeff2D
 

Public Member Functions

C2DWeightCache create_cache () const
 
T2DVector< T > derivative_at (const C2DFVector &x) const
 
const TCoeff2Dget_coefficients () const
 
operator() (const C2DFVector &x) const
 
operator() (const C2DFVector &x, C2DWeightCache &cache) const
 
 T2DInterpolator (const T2DDatafield< T > &data, PSplineKernel kernel)
 
 T2DInterpolator (const T2DDatafield< T > &data, PSplineKernel kernel, const CSplineBoundaryCondition &xbc, const CSplineBoundaryCondition &ybc)
 
 ~T2DInterpolator ()
 

Protected Types

typedef std::vector< typename TCoeff2D::value_type > coeff_vector
 helper class for the coefficient field More...
 

Detailed Description

template<class T>
class T2DInterpolator< T >

The base class for 2D interpolators that use some kind of spacial convolution.

Template Parameters
Tdata type to be interpolated

This class provides the interface for 2D interpolation based on some kind of spacial convolution, like e.g. by using B-splines.

Definition at line 98 of file 2d/interpolator.hh.

Member Typedef Documentation

◆ coeff_vector

template<class T>
typedef std::vector< typename TCoeff2D::value_type > T2DInterpolator< T >::coeff_vector
protected

helper class for the coefficient field

Definition at line 161 of file 2d/interpolator.hh.

◆ TCoeff2D

template<class T>
typedef T2DDatafield< typename coeff_map< T >::coeff_type > T2DInterpolator< T >::TCoeff2D

Data type of the field that holds the cofficients. Essentially, it uses the coeff_map template to translate whatever T is composed of to something that is composed of double float values to provide the required accuracy for interpolation.

Definition at line 152 of file 2d/interpolator.hh.

Constructor & Destructor Documentation

◆ T2DInterpolator() [1/2]

template<class T>
T2DInterpolator< T >::T2DInterpolator ( const T2DDatafield< T > &  data,
PSplineKernel  kernel 
)

Constructor for the interpolator. The input data is pre-filtered in order to ensure that the interpolation at grid points returns the original data values.

Parameters
datainput data to base th einterpolation on
kernelthe B-spline kernel to be used.

◆ T2DInterpolator() [2/2]

template<class T>
T2DInterpolator< T >::T2DInterpolator ( const T2DDatafield< T > &  data,
PSplineKernel  kernel,
const CSplineBoundaryCondition xbc,
const CSplineBoundaryCondition ybc 
)

Construtor to prefilter the input for proper interpolation

Parameters
datathe data used for interpolation
kernelthe spline kernel used for interpolation
xbcboundary conditions to be applied along the x-axis when interpolating
ybcboundary conditions to be applied along the y-axis when interpolating

◆ ~T2DInterpolator()

template<class T>
T2DInterpolator< T >::~T2DInterpolator ( )

Member Function Documentation

◆ create_cache()

template<class T>
C2DWeightCache T2DInterpolator< T >::create_cache ( ) const

Create the cache structure needed to run the interpolation in a multi-threaded environment. This function must be called in each thread once.

Returns
the cache structure

◆ derivative_at()

template<class T>
T2DVector<T> T2DInterpolator< T >::derivative_at ( const C2DFVector x) const

Evaluate the first order derivative on the given coordinate

Parameters
xlocation
Returns
teh drivatives in all coordinate directions as 2D vector
Remarks
this method is not thread save

◆ get_coefficients()

template<class T>
const TCoeff2D& T2DInterpolator< T >::get_coefficients ( ) const
Returns
the current coefficient field

◆ operator()() [1/2]

template<class T>
T T2DInterpolator< T >::operator() ( const C2DFVector x) const

Interpolate at the given input point

Parameters
xinput point
Returns
interpolated value
Remarks
this method is not thread save

◆ operator()() [2/2]

template<class T>
T T2DInterpolator< T >::operator() ( const C2DFVector x,
C2DWeightCache &  cache 
) const

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