T2DInterpolator< T > Class Template Reference
Interpolation

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 TCoeff2D & | get_coefficients () const
T | operator() (const C2DFVector &x) const
T | 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

## Detailed Description

template<class T>
class T2DInterpolator< T >

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

Template Parameters

  T | data 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 162 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 153 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

  data | input data to base th einterpolation on
  kernel | the 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

  data | the data used for interpolation
  kernel | the spline kernel used for interpolation
  xbc | boundary conditions to be applied along the x-axis when interpolating
  ybc | boundary 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

  x | location

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

  x | input 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:

- 2d/interpolator.hh