![]() |
sablib
|
A class for B-Spline operations including basis function calculation and interpolation. More...
#include <bspline.h>
Public Member Functions | |
| BSpline (const int degree, const Eigen::VectorX< Scalar > &knots) | |
| Constructor that initializes a B-Spline with a given degree and knot vector. | |
| BSpline (const int degree, const Eigen::VectorX< Scalar > &knots, const Eigen::VectorX< Scalar > &x, const Eigen::VectorX< Scalar > &y) | |
| Constructor that initializes a B-Spline and fits it to the given data points. | |
| BSpline (const int degree, const Eigen::VectorX< Scalar > &knots, const Eigen::VectorX< Scalar > &coefficients) | |
| Constructor that initializes a B-Spline with a given degree, knot vector, and coefficients. | |
| int | BasisSize () const |
| Gets the number of basis functions. | |
| const Eigen::VectorX< Scalar > | Knots () const |
| Returns the knot vector. | |
| const Eigen::VectorX< Scalar > | Coefficients () const |
| Returns the internal B-Spline coefficients. | |
| const Eigen::SparseMatrix< Scalar > | DesignMatrix (const Eigen::VectorX< Scalar > &x) const |
| Constructs the design matrix (collocation matrix) for a given set of x-coordinates. | |
| void | Fit (const Eigen::VectorX< Scalar > &x, const Eigen::VectorX< Scalar > &y) |
| Fits the B-Spline to the given data points by calculating the coefficients. | |
| const Scalar | Interpolate (const Scalar x, const Eigen::VectorX< Scalar > &coefficients) const |
| Interpolates the value at a given x-coordinate using provided B-Spline coefficients. | |
| const Scalar | Interpolate (const Scalar x) const |
| Interpolates the value at a given x-coordinate using the internal coefficients. | |
A class for B-Spline operations including basis function calculation and interpolation.
| Scalar | The scalar type for the spline (e.g., double, float). |
| sablib::BSpline< Scalar >::BSpline | ( | const int | degree, |
| const Eigen::VectorX< Scalar > & | knots ) |
| sablib::BSpline< Scalar >::BSpline | ( | const int | degree, |
| const Eigen::VectorX< Scalar > & | knots, | ||
| const Eigen::VectorX< Scalar > & | x, | ||
| const Eigen::VectorX< Scalar > & | y ) |
| sablib::BSpline< Scalar >::BSpline | ( | const int | degree, |
| const Eigen::VectorX< Scalar > & | knots, | ||
| const Eigen::VectorX< Scalar > & | coefficients ) |
| int sablib::BSpline< Scalar >::BasisSize | ( | ) | const |
| const Eigen::VectorX< Scalar > sablib::BSpline< Scalar >::Coefficients | ( | ) | const |
| const Eigen::SparseMatrix< Scalar > sablib::BSpline< Scalar >::DesignMatrix | ( | const Eigen::VectorX< Scalar > & | x | ) | const |
Constructs the design matrix (collocation matrix) for a given set of x-coordinates.
| x | The x-coordinates of the data points. |
Definition at line 267 of file bspline.h.
Referenced by Fit(), and sablib::PSpline().
| void sablib::BSpline< Scalar >::Fit | ( | const Eigen::VectorX< Scalar > & | x, |
| const Eigen::VectorX< Scalar > & | y ) |
Fits the B-Spline to the given data points by calculating the coefficients.
| x | The x-coordinates of the data points. |
| y | The y-coordinates of the data points. |
Definition at line 296 of file bspline.h.
References DesignMatrix().
Referenced by BSpline().
|
inline |
Interpolates the value at a given x-coordinate using the internal coefficients.
| x | The x-coordinate to interpolate. |
Definition at line 337 of file bspline.h.
References Interpolate().
| const Scalar sablib::BSpline< Scalar >::Interpolate | ( | const Scalar | x, |
| const Eigen::VectorX< Scalar > & | coefficients ) const |
Interpolates the value at a given x-coordinate using provided B-Spline coefficients.
| x | The x-coordinate to interpolate. |
| coefficients | The B-Spline coefficients. |
Definition at line 315 of file bspline.h.
Referenced by Interpolate(), and sablib::PSpline().
| const Eigen::VectorX< Scalar > sablib::BSpline< Scalar >::Knots | ( | ) | const |