Representation of an ordinary polynomial with scalar coefficients (that can be both real and complex).
More...
|
| Polynomial (std::size_t order) |
| Create polynomial with coefficients initialized to zero. More...
|
|
| Polynomial (const std::vector< T > &coefficients) |
| Create polynomial from vector. More...
|
|
| Polynomial (const Polynomial< T > &p) |
| Create polynomial from other polynomial. More...
|
|
| Polynomial (const PolynomialND< T, T > &p) |
| Create polynomial from other polynomial. More...
|
|
virtual | ~Polynomial () |
| Destructor.
|
|
T | evaluate (const T &x) const |
| Evaluate the polynomial using Horner's Method. More...
|
|
template<typename ErrT = T> |
T | evaluate (const T &x, ErrT &err) const |
| Evaluate the polynomial using Horner's Method. More...
|
|
std::vector< T > | evaluateDerivatives (const T &x, std::size_t n=1) const |
| Evaluate the first n derivatives of the polynomial using Horner's Method. More...
|
|
template<typename ErrT = T> |
std::vector< T > | evaluateDerivatives (const T &x, std::vector< ErrT > &err, std::size_t n=1) const |
| Evaluate the first n derivatives of the polynomial using Horner's Method. More...
|
|
Polynomial< T > | deflate (const T &x) const |
| Perform deflation of polynomial. More...
|
|
Polynomial< T > | derivative (std::size_t n=1) const |
| Get the derivative polynomial. More...
|
|
const Polynomial< T > | operator- () const |
| Negate coefficients. More...
|
|
bool | operator== (const Polynomial< T > &b) const |
| Check if polynomials are equal. More...
|
|
template<class Q > |
const Polynomial< Q > | cast () |
| Cast to other type. More...
|
|
|
Operators used to do arithmetic between two polynomials.
|
const Polynomial< T > | operator- (const Polynomial< T > &b) const |
| Polynomial subtraction. More...
|
|
Polynomial< T > & | operator-= (const Polynomial< T > &b) |
| Polynomial subtraction. More...
|
|
const Polynomial< T > | operator+ (const Polynomial< T > &b) const |
| Polynomial addition. More...
|
|
Polynomial< T > & | operator+= (const Polynomial< T > &b) |
| Polynomial addition. More...
|
|
void | operator= (const Polynomial< T > &b) |
| Assignment. More...
|
|
| PolynomialND (std::size_t order) |
| Create polynomial with uninitialized coefficients. More...
|
|
| PolynomialND (const std::vector< double > &coefficients) |
| Create polynomial from vector. More...
|
|
| PolynomialND (const PolynomialND< double, double > &p) |
| Create polynomial from other polynomial. More...
|
|
virtual | ~PolynomialND () |
| Destructor.
|
|
std::size_t | order () const |
| Get the order of the polynomial (the highest power). More...
|
|
void | increaseOrder (std::size_t increase, const double &value) |
| Increase the order of this polynomial. More...
|
|
void | increaseOrder (std::size_t increase=1) |
| Increase the order of this polynomial. More...
|
|
double | evaluate (const double &x) const |
| Evaluate the polynomial using Horner's Method. More...
|
|
std::vector< double > | evaluateDerivatives (const double &x, std::size_t n=1) const |
| Evaluate the first n derivatives of the polynomial using Horner's Method. More...
|
|
PolynomialND< double, double > | deflate (const double &x) const |
| Perform deflation of polynomial. More...
|
|
PolynomialND< double, double > | derivative (std::size_t n=1) const |
| Get the derivative polynomial. More...
|
|
const PolynomialND< double, double > | operator- () const |
| Negate coefficients. More...
|
|
bool | operator== (const PolynomialND< double, double > &b) const |
| Check if polynomials are equal. More...
|
|
const double & | operator() (std::size_t i) const |
| Get specific coefficient. More...
|
|
double & | operator() (size_t i) |
| Get specific coefficient. More...
|
|
const double & | operator[] (size_t i) const |
| Get specific coefficient. More...
|
|
double & | operator[] (size_t i) |
| Get specific coefficient. More...
|
|
const PolynomialND< double, double > | operator- (const PolynomialND< double, double > &b) const |
| Polynomial subtraction. More...
|
|
PolynomialND< double, double > & | operator-= (const PolynomialND< double, double > &b) |
| Polynomial subtraction. More...
|
|
const PolynomialND< double, double > | operator+ (const PolynomialND< double, double > &b) const |
| Polynomial addition. More...
|
|
PolynomialND< double, double > & | operator+= (const PolynomialND< double, double > &b) |
| Polynomial addition. More...
|
|
PolynomialND< OutCoef, double > | multiply (const PolynomialND< Coef2, double > &b) const |
| Polynomial multiplication. More...
|
|
PolynomialND< OutCoef, double > | multiply (const Coef2 &b) const |
| Multiply with a coefficient. More...
|
|
void | operator= (const PolynomialND< double, double > &b) |
| Assignment. More...
|
|
const PolynomialND< double, double > | operator* (double s) const |
| Scalar multiplication. More...
|
|
const PolynomialND< double, double > | operator/ (double s) const |
| Scalar division. More...
|
|
PolynomialND< double, double > & | operator*= (double s) |
| Scalar multiplication. More...
|
|
PolynomialND< double, double > & | operator/= (double s) |
| Scalar division. More...
|
|
|
Operators used to do arithmetic with scalars.
|
const Polynomial< T > | operator+ (T s) const |
| Scalar addition. More...
|
|
const Polynomial< T > | operator- (T s) const |
| Scalar subtraction. More...
|
|
const Polynomial< T > | operator* (T s) const |
| Scalar multiplication. More...
|
|
const Polynomial< T > | operator* (const Polynomial< T > &polynomial) const |
| Polynomial multiplication. More...
|
|
PolynomialND< Eigen::Matrix< T, 3, 1 >, T > | operator* (const PolynomialND< Eigen::Matrix< T, 3, 1 >, T > &polynomial) const |
| Multiply polynomial with scalar coefficients with a 3D polynomial vector. More...
|
|
PolynomialND< Eigen::Matrix< T, 1, 3 >, T > | operator* (const PolynomialND< Eigen::Matrix< T, 1, 3 >, T > &polynomial) const |
| Multiply polynomial with scalar coefficients with a 3D polynomial vector. More...
|
|
PolynomialND< Eigen::Matrix< T, 3, 3 >, T > | operator* (const PolynomialND< Eigen::Matrix< T, 3, 3 >, T > &polynomial) const |
| Multiply polynomial with scalar coefficients with a 3D polynomial matrix. More...
|
|
PolynomialND< Eigen::Matrix< T, 3, 1 >, T > | operator* (const Eigen::Matrix< T, 3, 1 > &a) const |
| Multiply polynomial with scalar coefficients with a vector. More...
|
|
PolynomialND< Eigen::Matrix< T, 1, 3 >, T > | operator* (const Eigen::Matrix< T, 1, 3 > &a) const |
| Multiply polynomial with scalar coefficients with a vector. More...
|
|
PolynomialND< Eigen::Matrix< T, 3, 3 >, T > | operator* (const Eigen::Matrix< T, 3, 3 > &A) const |
| Multiply polynomial with scalar coefficients with a matrix. More...
|
|
const Polynomial< T > | operator/ (T s) const |
| Scalar division. More...
|
|
Polynomial< T > & | operator+= (T s) |
| Scalar addition. More...
|
|
Polynomial< T > & | operator-= (T s) |
| Scalar subtraction. More...
|
|
Polynomial< T > & | operator*= (T s) |
| Scalar multiplication. More...
|
|
Polynomial< T > & | operator/= (T s) |
| Scalar division. More...
|
|
const Polynomial< T > | operator* (T s, const Polynomial< T > &p) |
| Scalar multiplication. More...
|
|
template<typename T = double>
class rw::math::Polynomial< T >
Representation of an ordinary polynomial with scalar coefficients (that can be both real and complex).
Representation of a polynomial of the following form:
\( f(x) = c_n x^n + c_(n-1) x^(n-1) + c_2 x^2 + c_1 x + c_0 \)
The polynomial is represented as a list of coefficients ordered from lowest-order term to highest-order term, \({c_0,c_1,...,c_n}\).