Template Class UniformTableInterpolator1D

Class Documentation

template<class T, class Backend>
class UniformTableInterpolator1D

Interpolator for 1D (x) table in the uniform grid.

The table is assumed to be uniformly spaced, i.e., x[i] = x_min + i * dx. Value is linearly interpolated between the two nearest table entries. If x is out of the table range, the nearest table value is returned.

Public Functions

inline UniformTableInterpolator1D(const Array1DView<T> &table, T x_min, T x_max)

Construct the interpolator from the table and grid parameters.

inline T operator()(T x) const noexcept

Interpolate values at x.

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

Interpolate values at the 1D array of x.

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

Interpolate values at the 3D array of x.