PCL
pcl::UnidimensionalInterpolation< T > Class Template Referenceabstract

A generic interface to one-dimensional interpolation algorithms. More...

#include <UnidimensionalInterpolation.h>

+ Inheritance diagram for pcl::UnidimensionalInterpolation< T >:

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_typeX () const
 
const vector_typeY () const
 

Detailed Description

template<typename T>
class pcl::UnidimensionalInterpolation< T >

UnidimensionalInterpolation is an abstract base class for all one-dimensional interpolation algorithm implementations in PCL.

Definition at line 75 of file UnidimensionalInterpolation.h.

Member Typedef Documentation

◆ vector_type

template<typename T >
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.

Constructor & Destructor Documentation

◆ UnidimensionalInterpolation() [1/2]

template<typename T >
pcl::UnidimensionalInterpolation< T >::UnidimensionalInterpolation ( )
default

Constructs a UnidimensionalInterpolation object.

◆ UnidimensionalInterpolation() [2/2]

template<typename T >
pcl::UnidimensionalInterpolation< T >::UnidimensionalInterpolation ( const UnidimensionalInterpolation< T > &  )
default

Copy constructor.

◆ ~UnidimensionalInterpolation()

template<typename T >
virtual pcl::UnidimensionalInterpolation< T >::~UnidimensionalInterpolation ( )
inlinevirtual

Virtual destructor.

Definition at line 97 of file UnidimensionalInterpolation.h.

Member Function Documentation

◆ Clear()

template<typename T >
virtual void pcl::UnidimensionalInterpolation< T >::Clear ( )
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().

◆ Initialize() [1/2]

template<typename T >
void pcl::UnidimensionalInterpolation< T >::Initialize ( const T *  x,
const T *  y,
int  n 
)
inline

Initializes a new interpolation.

Parameters
xArray of x-values:

  • If x != 0: Must be a list of monotonically increasing, distinct values: x[0] < x[1] < ... < x[n-1].
  • If x == 0: The interpolation will use implicit x[i] = i for i = {0,1,...,n-1}.
yArray of function values for i = {0,1,...,n-1}.
nNumber of data points. The minimum number of required data points depends on the interpolation algorithm. In general, all algorithms require at least n >= 2.
Deprecated:
This member function has been deprecated. For newly produced code, use Initialize( const vector_type&, const vector_type& ).

Definition at line 141 of file UnidimensionalInterpolation.h.

◆ Initialize() [2/2]

template<typename T >
virtual void pcl::UnidimensionalInterpolation< T >::Initialize ( const vector_type x,
const vector_type y 
)
inlinevirtual

Initializes a new interpolation.

Parameters
xVector of x-values:

  • If this vector is not empty: Must be a set of monotonically
    increasing, distinct values: x[0] < x[1] < ... < x[n-1].
  • If this vector is empty: The interpolation will use implicit x[i] = i for i = {0,1,...,n-1}.
yVector of function values for i = {0,1,...,n-1}.

Definition at line 114 of file UnidimensionalInterpolation.h.

References pcl::GenericVector< T >::Length().

◆ IsValid()

template<typename T >
virtual bool pcl::UnidimensionalInterpolation< T >::IsValid ( ) const
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.

◆ Length()

template<typename T >
int pcl::UnidimensionalInterpolation< T >::Length ( ) const
inline

Returns the length of the interpolated function value vector.

Definition at line 200 of file UnidimensionalInterpolation.h.

◆ operator()()

template<typename T >
virtual double pcl::UnidimensionalInterpolation< T >::operator() ( double  x) const
pure virtual

Returns an interpolated function value at x location.

Implemented in pcl::LinearInterpolation< T >, pcl::CubicSplineInterpolation< T >, and pcl::AkimaInterpolation< T >.

◆ UsingImplicitX()

template<typename T >
bool pcl::UnidimensionalInterpolation< T >::UsingImplicitX ( ) const
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.

◆ X()

template<typename T >
const vector_type& pcl::UnidimensionalInterpolation< T >::X ( ) const
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.

◆ Y()

template<typename T >
const vector_type& pcl::UnidimensionalInterpolation< T >::Y ( ) const
inline

Returns a reference to the interpolated function value vector.

Definition at line 183 of file UnidimensionalInterpolation.h.


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