Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions
pcl::BivariatePolynomialT< real > Class Template Reference

This represents a bivariate polynomial and provides some functionality for it. More...

#include <pcl/common/bivariate_polynomial.h>

Public Member Functions

 BivariatePolynomialT (int new_degree=0)
 Constructor. More...
 
 BivariatePolynomialT (const BivariatePolynomialT &other)
 Copy constructor. More...
 
 ~BivariatePolynomialT ()
 Destructor. More...
 
BivariatePolynomialToperator= (const BivariatePolynomialT &other)
 = operator More...
 
void setDegree (int new_degree)
 Initialize members to default values. More...
 
unsigned int getNoOfParameters () const
 How many parameters has a bivariate polynomial with this degree. More...
 
real getValue (real x, real y) const
 Calculate the value of the polynomial at the given point. More...
 
void calculateGradient (bool forceRecalc=false)
 Calculate the gradient of this polynomial If forceRecalc is false, it will do nothing when the gradient already exists. More...
 
void getValueOfGradient (real x, real y, real &gradX, real &gradY)
 Calculate the value of the gradient at the given point. More...
 
void findCriticalPoints (std::vector< real > &x_values, std::vector< real > &y_values, std::vector< int > &types) const
 Returns critical points of the polynomial. More...
 
void writeBinary (std::ostream &os) const
 write as binary to a stream More...
 
void writeBinary (const char *filename) const
 write as binary into a file More...
 
void readBinary (std::istream &os)
 read binary from a stream More...
 
void readBinary (const char *filename)
 read binary from a file More...
 

Static Public Member Functions

static unsigned int getNoOfParametersFromDegree (int n)
 How many parameters has a bivariate polynomial of the given degree. More...
 

Public Attributes

int degree {0}
 
real * parameters {nullptr}
 
BivariatePolynomialT< real > * gradient_x {nullptr}
 
BivariatePolynomialT< real > * gradient_y {nullptr}
 

Protected Member Functions

void memoryCleanUp ()
 Delete all members. More...
 
void deepCopy (const BivariatePolynomialT< real > &other)
 Create a deep copy of the given polynomial. More...
 

Detailed Description

template<typename real>
class pcl::BivariatePolynomialT< real >

This represents a bivariate polynomial and provides some functionality for it.

Author
Bastian Steder

Definition at line 53 of file bivariate_polynomial.h.

Constructor & Destructor Documentation

◆ BivariatePolynomialT() [1/2]

template<typename real >
pcl::BivariatePolynomialT< real >::BivariatePolynomialT ( int  new_degree = 0)

Constructor.

Definition at line 55 of file bivariate_polynomial.hpp.

◆ BivariatePolynomialT() [2/2]

template<typename real >
pcl::BivariatePolynomialT< real >::BivariatePolynomialT ( const BivariatePolynomialT< real > &  other)

Copy constructor.

Definition at line 62 of file bivariate_polynomial.hpp.

◆ ~BivariatePolynomialT()

template<typename real >
pcl::BivariatePolynomialT< real >::~BivariatePolynomialT

Destructor.

Definition at line 69 of file bivariate_polynomial.hpp.

Member Function Documentation

◆ calculateGradient()

template<typename real >
void pcl::BivariatePolynomialT< real >::calculateGradient ( bool  forceRecalc = false)

Calculate the gradient of this polynomial If forceRecalc is false, it will do nothing when the gradient already exists.

Definition at line 139 of file bivariate_polynomial.hpp.

◆ deepCopy()

template<typename real >
void pcl::BivariatePolynomialT< real >::deepCopy ( const BivariatePolynomialT< real > &  other)
protected

◆ findCriticalPoints()

template<typename real >
void pcl::BivariatePolynomialT< real >::findCriticalPoints ( std::vector< real > &  x_values,
std::vector< real > &  y_values,
std::vector< int > &  types 
) const

Returns critical points of the polynomial.

type can be 0=maximum, 1=minimum, or 2=saddle point !!Currently only implemented for degree 2!!

Definition at line 200 of file bivariate_polynomial.hpp.

◆ getNoOfParameters()

template<typename real >
unsigned int pcl::BivariatePolynomialT< real >::getNoOfParameters ( ) const
inline

How many parameters has a bivariate polynomial with this degree.

Definition at line 76 of file bivariate_polynomial.h.

References pcl::BivariatePolynomialT< real >::degree, and pcl::BivariatePolynomialT< real >::getNoOfParametersFromDegree().

◆ getNoOfParametersFromDegree()

template<typename real >
static unsigned int pcl::BivariatePolynomialT< real >::getNoOfParametersFromDegree ( int  n)
inlinestatic

How many parameters has a bivariate polynomial of the given degree.

Definition at line 114 of file bivariate_polynomial.h.

Referenced by pcl::PolynomialCalculationsT< real >::bivariatePolynomialApproximation(), and pcl::BivariatePolynomialT< real >::getNoOfParameters().

◆ getValue()

template<typename real >
real pcl::BivariatePolynomialT< real >::getValue ( real  x,
real  y 
) const

Calculate the value of the polynomial at the given point.

Definition at line 170 of file bivariate_polynomial.hpp.

◆ getValueOfGradient()

template<typename real >
void pcl::BivariatePolynomialT< real >::getValueOfGradient ( real  x,
real  y,
real &  gradX,
real &  gradY 
)

Calculate the value of the gradient at the given point.

Definition at line 191 of file bivariate_polynomial.hpp.

◆ memoryCleanUp()

template<typename real >
void pcl::BivariatePolynomialT< real >::memoryCleanUp
protected

Delete all members.

Definition at line 97 of file bivariate_polynomial.hpp.

◆ operator=()

template<typename real >
BivariatePolynomialT& pcl::BivariatePolynomialT< real >::operator= ( const BivariatePolynomialT< real > &  other)
inline

= operator

Definition at line 67 of file bivariate_polynomial.h.

References pcl::BivariatePolynomialT< real >::deepCopy().

◆ readBinary() [1/2]

template<typename real >
void pcl::BivariatePolynomialT< real >::readBinary ( const char *  filename)

read binary from a file

Definition at line 304 of file bivariate_polynomial.hpp.

◆ readBinary() [2/2]

template<typename real >
void pcl::BivariatePolynomialT< real >::readBinary ( std::istream &  os)

read binary from a stream

Definition at line 293 of file bivariate_polynomial.hpp.

◆ setDegree()

template<typename real >
void pcl::BivariatePolynomialT< real >::setDegree ( int  new_degree)

Initialize members to default values.

Definition at line 76 of file bivariate_polynomial.hpp.

Referenced by pcl::PolynomialCalculationsT< real >::bivariatePolynomialApproximation().

◆ writeBinary() [1/2]

template<typename real >
void pcl::BivariatePolynomialT< real >::writeBinary ( const char *  filename) const

write as binary into a file

Definition at line 285 of file bivariate_polynomial.hpp.

◆ writeBinary() [2/2]

template<typename real >
void pcl::BivariatePolynomialT< real >::writeBinary ( std::ostream &  os) const

write as binary to a stream

Definition at line 276 of file bivariate_polynomial.hpp.

Member Data Documentation

◆ degree

template<typename real >
int pcl::BivariatePolynomialT< real >::degree {0}

◆ gradient_x

template<typename real >
BivariatePolynomialT<real>* pcl::BivariatePolynomialT< real >::gradient_x {nullptr}

Definition at line 119 of file bivariate_polynomial.h.

Referenced by pcl::BivariatePolynomialT< real >::deepCopy().

◆ gradient_y

template<typename real >
BivariatePolynomialT<real>* pcl::BivariatePolynomialT< real >::gradient_y {nullptr}

Definition at line 120 of file bivariate_polynomial.h.

Referenced by pcl::BivariatePolynomialT< real >::deepCopy().

◆ parameters

template<typename real >
real* pcl::BivariatePolynomialT< real >::parameters {nullptr}

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