Class AkimaSplineInterpolator#
Defined in File Interpolation.h
Inheritance Relationships#
Base Type#
public Karana::Math::BaseInterpolator(Class BaseInterpolator)
Class Documentation#
-
class AkimaSplineInterpolator : public Karana::Math::BaseInterpolator#
Akima spline interpolation method
Uses a piecewise-cubic spline well-suited to cases where the underlying data has a rapidly varying second derivative.
Public Types
Public Functions
-
AkimaSplineInterpolator(ConstVecSlice indep, ConstVecSlice dep, std::optional<Extrapolation> extrapolation = std::nullopt)#
AkimaSplineInterpolator constructor.
- Parameters:
indep – Strictly increasing independent variable values
dep – Corresponding dependent variable values
extrapolation – How to extrapolate outside the data points. If omitted, extrapolated values are NaN.
-
virtual double operator()(double x) const override#
Sample the dependent variable.
- Parameters:
x – A value for the independent variable
- Returns:
The corresponding value for the dependent variable
-
virtual void operator()(ConstVecSlice x, VecSlice out) const#
Sample the dependent variable at multiple values.
- Parameters:
x – A vector containing values for the independent variable
out – A matching sized vector to contain the result
-
virtual Vec operator()(ConstVecSlice x) const#
Sample the dependent variable at multiple values.
- Parameters:
x – A vector containing values for the independent variable
- Returns:
A corresponding vector of dependent variable values
-
AkimaSplineInterpolator(ConstVecSlice indep, ConstVecSlice dep, std::optional<Extrapolation> extrapolation = std::nullopt)#