Template Class UniformTableInterpolator2D

Class Documentation

template<class T, class Backend>
class UniformTableInterpolator2D

Interpolator for 2D (x0, x1) table in the uniform grid.

The table is assumed to be uniformly spaced, i.e., x0[i] = x0_min + i * dx0, x1[j] = x1_min + j * dx1. Value is linearly interpolated between the two nearest table entries. If (x0, x1) is out of the table range, the nearest table value is returned.

Public Functions

inline UniformTableInterpolator2D(const Array2DView<T> &table, T x0_min, T x0_max, T x1_min, T x1_max)

Construct the interpolator from the table and grid parameters.

inline T operator()(T x0, T x1) const noexcept

Interpolate values at (x0, x1).

inline void interpolate(Array1DView<const T> x0, Array1DView<const T> x1, Array1DView<T> y) const noexcept

Interpolate values at the 1D arrays of (x0, x1).

inline void interpolate(Array3DView<const T> x0, Array3DView<const T> x1, Array3DView<T> y) const noexcept

Interpolate values at the 3D array of (x0, x1).