PCL
|
A generic interface to one-dimensional interpolation algorithms. More...
#include <UnidimensionalInterpolation.h>
Public Types | |
using | vector_type = GenericVector< T > |
Public Member Functions | |
UnidimensionalInterpolation ()=default | |
UnidimensionalInterpolation (const UnidimensionalInterpolation &)=default | |
virtual | ~UnidimensionalInterpolation () |
virtual void | Clear () |
void | Initialize (const T *x, const T *y, int n) |
virtual void | Initialize (const vector_type &x, const vector_type &y) |
virtual bool | IsValid () const |
int | Length () const |
virtual double | operator() (double x) const =0 |
bool | UsingImplicitX () const |
const vector_type & | X () const |
const vector_type & | Y () const |
UnidimensionalInterpolation is an abstract base class for all one-dimensional interpolation algorithm implementations in PCL.
Definition at line 75 of file UnidimensionalInterpolation.h.
using pcl::UnidimensionalInterpolation< T >::vector_type = GenericVector<T> |
Represents a vector of independent and dependent variable values.
Definition at line 82 of file UnidimensionalInterpolation.h.
|
default |
Constructs a UnidimensionalInterpolation object.
|
default |
Copy constructor.
|
inlinevirtual |
Virtual destructor.
Definition at line 97 of file UnidimensionalInterpolation.h.
|
inlinevirtual |
Clears auxiliary or intermediate interpolation data. Derived classes overriding this function should call their base class version via explicit downcast.
Reimplemented in pcl::CubicSplineInterpolation< T >, and pcl::AkimaInterpolation< T >.
Definition at line 156 of file UnidimensionalInterpolation.h.
Referenced by pcl::AkimaInterpolation< T >::Clear(), and pcl::CubicSplineInterpolation< T >::Clear().
|
inline |
Initializes a new interpolation.
x | Array of x-values:
|
y | Array of function values for i = {0,1,...,n-1}. |
n | Number of data points. The minimum number of required data points depends on the interpolation algorithm. In general, all algorithms require at least n >= 2. |
Definition at line 141 of file UnidimensionalInterpolation.h.
|
inlinevirtual |
Initializes a new interpolation.
x | Vector of x-values:
|
y | Vector of function values for i = {0,1,...,n-1}. |
Definition at line 114 of file UnidimensionalInterpolation.h.
References pcl::GenericVector< T >::Length().
|
inlinevirtual |
Returns true iff this interpolation is valid, i.e. if it has been correctly initialized and is ready to interpolate function values.
Reimplemented in pcl::LinearInterpolation< T >, pcl::CubicSplineInterpolation< T >, and pcl::AkimaInterpolation< T >.
Definition at line 166 of file UnidimensionalInterpolation.h.
|
inline |
Returns the length of the interpolated function value vector.
Definition at line 200 of file UnidimensionalInterpolation.h.
|
pure virtual |
Returns an interpolated function value at x location.
Implemented in pcl::LinearInterpolation< T >, pcl::CubicSplineInterpolation< T >, and pcl::AkimaInterpolation< T >.
|
inline |
Returns true iff this interpolation uses implicit x[i] = i for i = {0,1,...,n-1}.
Definition at line 192 of file UnidimensionalInterpolation.h.
|
inline |
Returns a reference to the x-value data vector. Returns an empty vector if this interpolation uses implicit x[i] = i for i = {0,1,...,n-1}.
Definition at line 175 of file UnidimensionalInterpolation.h.
|
inline |
Returns a reference to the interpolated function value vector.
Definition at line 183 of file UnidimensionalInterpolation.h.