![]() |
sablib
|
A class for cubic spline interpolation. More...
#include <cubic_spline.h>
Public Member Functions | |
| CubicSpline ()=default | |
| Default constructor. | |
| CubicSpline (const Eigen::VectorX< Scalar > &x, const Eigen::VectorX< Scalar > &y) | |
| Constructor that fits a cubic spline to the given data points. | |
| void | Fit (const Eigen::VectorX< Scalar > &x, const Eigen::VectorX< Scalar > &y) |
| Fits a cubic spline to the given data points. | |
| Scalar | Interpolate (const double x) const |
| Interpolates the value at a given x-coordinate. | |
| Scalar | operator() (const double x) const |
| Interpolates the value at a given x-coordinate. | |
A class for cubic spline interpolation.
| Scalar | The scalar type for the spline (e.g., double, float). |
Definition at line 23 of file cubic_spline.h.
|
inline |
Constructor that fits a cubic spline to the given data points.
| x | The x-coordinates of the data points. |
| y | The y-coordinates of the data points. |
Definition at line 92 of file cubic_spline.h.
References Fit().
| void sablib::CubicSpline< Scalar >::Fit | ( | const Eigen::VectorX< Scalar > & | x, |
| const Eigen::VectorX< Scalar > & | y ) |
Fits a cubic spline to the given data points.
| x | The x-coordinates of the data points. |
| y | The y-coordinates of the data points. |
| std::invalid_argument | Thrown if x and y sizes differ, if size < 2, or if x is not strictly increasing. |
Definition at line 101 of file cubic_spline.h.
Referenced by CubicSpline().
| Scalar sablib::CubicSpline< Scalar >::Interpolate | ( | const double | x | ) | const |
Interpolates the value at a given x-coordinate.
| x | The x-coordinate to interpolate. |
Definition at line 188 of file cubic_spline.h.
Referenced by sablib::BaselineSpline(), and operator()().
|
inline |
Interpolates the value at a given x-coordinate.
| x | The x-coordinate to interpolate. |
Definition at line 64 of file cubic_spline.h.
References Interpolate().