SpECTRE  v2021.10.04
intrp::CubicSpline Class Reference

A natural cubic spline interpolation class. More...

#include <CubicSpline.hpp>

Public Member Functions

 CubicSpline (std::vector< double > x_values, std::vector< double > y_values)
 CubicSpline (const CubicSpline &)=delete
CubicSplineoperator= (const CubicSpline &)=delete
 CubicSpline (CubicSpline &&)=default
CubicSplineoperator= (CubicSpline &&rhs)=default
double operator() (double x_to_interp_to) const
void pup (PUP::er &p)

Detailed Description

A natural cubic spline interpolation class.

The class builds a cubic spline interpolant with natural boundary conditions using the x_values and y_values passed into the constructor. For details on the algorithm see the GSL documentation on gsl_interp_cspline.

Here is an example how to use this class:

intrp::CubicSpline interpolant{x_values, y_values};
const double x_to_interpolate_to =
CHECK(interpolant(x_to_interpolate_to) ==
A natural cubic spline interpolation class.
Definition: CubicSpline.hpp:29
T lower_bound(T... args)
T upper_bound(T... args)

The documentation for this class was generated from the following file: