PCL
|
Generic interpolating cubic spline. More...
#include <CubicSplineInterpolation.h>
Public Member Functions | |
CubicSplineInterpolation ()=default | |
CubicSplineInterpolation (const CubicSplineInterpolation &)=default | |
CubicSplineInterpolation (CubicSplineInterpolation &&)=default | |
~CubicSplineInterpolation () override | |
void | Clear () override |
void | GetBoundaryConditions (double &y1, double &yn) const |
void | Initialize (const vector_type &x, const vector_type &y) override |
bool | IsValid () const override |
double | operator() (double x) const override |
void | SetBoundaryConditions (double y1, double yn) |
Public Member Functions inherited from pcl::UnidimensionalInterpolation< double > | |
UnidimensionalInterpolation ()=default | |
UnidimensionalInterpolation (const UnidimensionalInterpolation &)=default | |
virtual | ~UnidimensionalInterpolation () |
void | Initialize (const double *x, const double *y, int n) |
virtual void | Initialize (const vector_type &x, const vector_type &y) |
int | Length () const |
bool | UsingImplicitX () const |
const vector_type & | X () const |
const vector_type & | Y () const |
Additional Inherited Members | |
Public Types inherited from pcl::UnidimensionalInterpolation< double > | |
using | vector_type = GenericVector< double > |
Interpolation with piecewise cubic polynomials. Spline interpolation is usually preferred to interpolation with high-degree polynomials, which are subject to oscillations caused by the Runge's phenomenon.
Definition at line 81 of file CubicSplineInterpolation.h.
|
default |
Constructs an empty CubicSplineInterpolation instance, which cannot be used for interpolation prior to initialization.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inlineoverride |
Virtual destructor.
Definition at line 106 of file CubicSplineInterpolation.h.
|
inlineoverridevirtual |
Resets this cubic spline interpolation, deallocating all internal working structures.
Reimplemented from pcl::UnidimensionalInterpolation< double >.
Definition at line 324 of file CubicSplineInterpolation.h.
References pcl::UnidimensionalInterpolation< T >::Clear().
|
inline |
Gets the boundary conditions of this interpolating cubic spline.
[out] | y1 | First derivative of the interpolating cubic spline at the first data point x[0]. |
[out] | yn | First derivative of the interpolating cubic spline at the last data point x[n-1]. |
Definition at line 119 of file CubicSplineInterpolation.h.
|
inlineoverride |
Generation of an interpolating cubic spline.
x | Vector of x-values:
|
y | Vector of function values for i = {0,1,...,n-1}. |
When x is an empty vector, a natural spline is always generated: boundary conditions are ignored and taken as zero at both ends of the data sequence.
The length of the y vector (and also the length of a nonempty x vector) must be n >= 2.
Definition at line 160 of file CubicSplineInterpolation.h.
|
inlineoverridevirtual |
Returns true iff this interpolation is valid, i.e. if it has been correctly initialized and is ready to interpolate function values.
Reimplemented from pcl::UnidimensionalInterpolation< double >.
Definition at line 334 of file CubicSplineInterpolation.h.
|
inlineoverridevirtual |
Cubic spline interpolation. Returns an interpolated value at the specified point x.
Implements pcl::UnidimensionalInterpolation< double >.
Definition at line 259 of file CubicSplineInterpolation.h.
|
inline |
Sets the boundary conditions of this interpolating cubic spline.
y1 | First derivative of the interpolating cubic spline at the first data point x[0]. |
yn | First derivative of the interpolating cubic spline at the last data point x[n-1]. |
Definition at line 134 of file CubicSplineInterpolation.h.