LinearInterpolation

class LinearInterpolation

Utility class for linear interpolation.

Public Functions

LinearInterpolation()

Construct an empty linear interpolation object.

LinearInterpolation(const std::vector<Real> &x, const std::vector<Real> &y)

Construct interpolation object by providing independent and dependent values.

Parameters:
  • x – Independent values

  • y – Dependent values

void create(const std::vector<Real> &x, const std::vector<Real> &y)

Create the interpolation object by providing independent and dependent values.

Parameters:
  • x – Independent values

  • y – Dependent values

Real sample(Real x)

Sample the interpolation at a point.

@params x Point where we sample the interpolation

Returns:

Interpolated value