This provides some functionality for polynomials, like finding roots or approximating bivariate polynomials. More...
#include <pcl/common/polynomial_calculations.h>
Classes | |
struct | Parameters |
Parameters used in this class. More... |
|
Public Member Functions | |
void | solveQuarticEquation (real a, real b, real c, real d, real e, std::vector< real > &roots) const |
Solves an equation of the form ax^4 + bx^3 + cx^2 +dx + e = 0 See http://en.wikipedia.org/wiki/Quartic_equation#Summary_of_Ferrari.27s_method. More... |
|
void | solveCubicEquation (real a, real b, real c, real d, std::vector< real > &roots) const |
Solves an equation of the form ax^3 + bx^2 + cx + d = 0 See http://en.wikipedia.org/wiki/Cubic_equation. More... |
|
void | solveQuadraticEquation (real a, real b, real c, std::vector< real > &roots) const |
Solves an equation of the form ax^2 + bx + c = 0 See http://en.wikipedia.org/wiki/Quadratic_equation. More... |
|
void | solveLinearEquation (real a, real b, std::vector< real > &roots) const |
Solves an equation of the form ax + b = 0. More... |
|
BivariatePolynomialT< real > | bivariatePolynomialApproximation (std::vector< Eigen::Matrix< real, 3, 1 >, Eigen::aligned_allocator< Eigen::Matrix< real, 3, 1 > > > &samplePoints, unsigned int polynomial_degree, bool &error) const |
Get the bivariate polynomial approximation for Z(X,Y) from the given sample points. More... |
|
bool | bivariatePolynomialApproximation (std::vector< Eigen::Matrix< real, 3, 1 >, Eigen::aligned_allocator< Eigen::Matrix< real, 3, 1 > > > &samplePoints, unsigned int polynomial_degree, BivariatePolynomialT< real > &ret) const |
Same as above, using a reference for the return value. More... |
|
void | setZeroValue (real new_zero_value) |
Set the minimum value under which values are considered zero. More... |
|
Protected Member Functions | |
bool | isNearlyZero (real d) const |
check if std::abs(d)<zeroValue More... |
|
bool | sqrtIsNearlyZero (real d) const |
check if sqrt(std::abs(d))<zeroValue More... |
|
Protected Attributes | |
Parameters | parameters_ |
This provides some functionality for polynomials, like finding roots or approximating bivariate polynomials.
Definition at line 49 of file polynomial_calculations.h.
| inline |
Same as above, using a reference for the return value.
Definition at line 408 of file polynomial_calculations.hpp.
References pcl::BivariatePolynomialT< real >::getNoOfParametersFromDegree(), pcl::BivariatePolynomialT< real >::parameters, and pcl::BivariatePolynomialT< real >::setDegree().
| inline |
Get the bivariate polynomial approximation for Z(X,Y) from the given sample points.
The parameters a,b,c,... for the polynom are returned. The order is, e.g., for degree 1: ax+by+c and for degree 2: ax²+bxy+cx+dy²+ey+f. error is set to true if the approximation did not work for any reason (not enough points, matrix not invertible, etc.)
Definition at line 397 of file polynomial_calculations.hpp.
| inlineprotected |
check if std::abs(d)<zeroValue
Definition at line 107 of file polynomial_calculations.h.
References pcl::PolynomialCalculationsT< real >::parameters_, and pcl::PolynomialCalculationsT< real >::Parameters::zero_value.
Referenced by pcl::PolynomialCalculationsT< real >::solveCubicEquation(), pcl::PolynomialCalculationsT< real >::solveLinearEquation(), pcl::PolynomialCalculationsT< real >::solveQuadraticEquation(), and pcl::PolynomialCalculationsT< real >::solveQuarticEquation().
| inline |
Set the minimum value under which values are considered zero.
Definition at line 101 of file polynomial_calculations.h.
References pcl::PolynomialCalculationsT< real >::parameters_, and pcl::PolynomialCalculationsT< real >::Parameters::setZeroValue().
| inline |
Solves an equation of the form ax^3 + bx^2 + cx + d = 0 See http://en.wikipedia.org/wiki/Cubic_equation.
Definition at line 145 of file polynomial_calculations.hpp.
References pcl::PolynomialCalculationsT< real >::isNearlyZero(), M_PI, and pcl::PolynomialCalculationsT< real >::solveQuadraticEquation().
Referenced by pcl::PolynomialCalculationsT< real >::solveQuarticEquation().
| inline |
Solves an equation of the form ax + b = 0.
Definition at line 58 of file polynomial_calculations.hpp.
References pcl::PolynomialCalculationsT< real >::isNearlyZero().
Referenced by pcl::PolynomialCalculationsT< real >::solveQuadraticEquation().
| inline |
Solves an equation of the form ax^2 + bx + c = 0 See http://en.wikipedia.org/wiki/Quadratic_equation.
Definition at line 90 of file polynomial_calculations.hpp.
References pcl::PolynomialCalculationsT< real >::isNearlyZero(), pcl::PolynomialCalculationsT< real >::solveLinearEquation(), and pcl::PolynomialCalculationsT< real >::sqrtIsNearlyZero().
Referenced by pcl::PolynomialCalculationsT< real >::solveCubicEquation(), and pcl::PolynomialCalculationsT< real >::solveQuarticEquation().
| inline |
Solves an equation of the form ax^4 + bx^3 + cx^2 +dx + e = 0 See http://en.wikipedia.org/wiki/Quartic_equation#Summary_of_Ferrari.27s_method.
Definition at line 246 of file polynomial_calculations.hpp.
References pcl::PolynomialCalculationsT< real >::isNearlyZero(), pcl::PolynomialCalculationsT< real >::solveCubicEquation(), pcl::PolynomialCalculationsT< real >::solveQuadraticEquation(), and pcl::PolynomialCalculationsT< real >::sqrtIsNearlyZero().
| inlineprotected |
check if sqrt(std::abs(d))<zeroValue
Definition at line 114 of file polynomial_calculations.h.
References pcl::PolynomialCalculationsT< real >::parameters_, and pcl::PolynomialCalculationsT< real >::Parameters::sqr_zero_value.
Referenced by pcl::PolynomialCalculationsT< real >::solveQuadraticEquation(), and pcl::PolynomialCalculationsT< real >::solveQuarticEquation().
| protected |
Definition at line 120 of file polynomial_calculations.h.
Referenced by pcl::PolynomialCalculationsT< real >::isNearlyZero(), pcl::PolynomialCalculationsT< real >::setZeroValue(), and pcl::PolynomialCalculationsT< real >::sqrtIsNearlyZero().
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_polynomial_calculations_t.html