Class CubicSplineModel

Inheritance Relationships

Base Type

Class Documentation

class CubicSplineModel : public navtk::utils::InterpolationModel

Cubic spline model, heavily inspired by scipy’s implementation of the ‘natural’ cubic spline with no extrapolation.

https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.CubicSpline.html#scipy.interpolate.CubicSpline

Public Functions

CubicSplineModel(const std::vector<double> &x, const std::vector<double> &y)

Constructor.

Parameters
  • x – Independent sample points, size N.

  • y – Dependent sampled values at each x element, size N. Also 0th order terms of splines polynomial coefficients.

virtual double y_at(double x_interp) override

Get the interpolated data point at query value.

Parameters

x_interp – Query point to generate interpolated data at.

Returns

Interpolated data at x_interp.