Aim: Represents a multivariate polynomial, i.e. an element of \( K[X_0, ..., X_{n-1}] \), where K is some ring or field.
More...
|
| void | normalize () |
| | MPolynomial (const Alloc &allocator=Alloc()) |
| | MPolynomial (const Ring &v, const Alloc &allocator=Alloc()) |
| | MPolynomial (const MPolyNM1 &pdm1, const Alloc &) |
| template<typename Ring2, typename Alloc2> |
| | MPolynomial (const MPolynomial< n, Ring2, Alloc2 > &p, const Alloc &allocator=Alloc()) |
| template<typename Ring2, typename Alloc2> |
| MPolynomial & | operator= (const MPolynomial< n, Ring2, Alloc2 > &p) |
| void | swap (MPolynomial &p) |
| Alloc | getAllocator () const |
| int | degree () const |
| const MPolyNM1 & | leading () const |
| bool | isZero () const |
| MPolyNM1 & | operator[] (Size i) |
| const MPolyNM1 & | operator[] (Size i) const |
| MPolynomialEvaluator< n, Ring, Alloc, Ring > | operator() (const Ring &x) const |
| template<typename Ring2> |
| MPolynomialEvaluator< n, Ring, Alloc, Ring2 > | operator() (const Ring2 &x) const |
| MPolynomial | operator* (const Ring &v) const |
| MPolynomial | operator/ (const Ring &v) const |
| MPolynomial & | operator*= (const MPolynomial &p) |
| MPolynomial & | operator*= (const Ring &v) |
| MPolynomial & | operator/= (const Ring &v) |
| MPolynomial | operator- () const |
| MPolynomial | operator+ (const MPolynomial &q) const |
| MPolynomial | operator- (const MPolynomial &q) const |
| MPolynomial & | operator+= (const MPolynomial &q) |
| MPolynomial & | operator-= (const MPolynomial &q) |
| MPolynomial | operator+ (const MPolyNM1 &q) const |
| MPolynomial | operator- (const MPolyNM1 &q) const |
| MPolynomial | operator+ (const Ring &v) const |
| MPolynomial | operator- (const Ring &v) const |
| MPolynomial & | operator+= (const MPolyNM1 &q) |
| MPolynomial & | operator-= (const MPolyNM1 &q) |
| MPolynomial & | operator+= (const Ring &v) |
| MPolynomial & | operator-= (const Ring &v) |
| MPolynomial | operator* (const MPolynomial &p) const |
| bool | operator== (const MPolynomial &q) const |
| bool | operator!= (const MPolynomial &q) const |
| bool | operator== (const Ring &v) const |
| bool | operator!= (const Ring &v) const |
| void | selfDisplay (std::ostream &s, int N=n) const |
| bool | isValid () const |
|
| template<int NN, int nn, typename TT, typename AA> |
| class | MPolynomialDerivativeComputer |
| template<int nn, typename TT, typename AA, typename SS> |
| class | MPolynomialEvaluator |
| template<int nn, typename TT, typename HLHL, typename AA, typename SS> |
| class | MPolynomialEvaluatorImpl |
| void | euclidDiv (const MPolynomial< 1, TRing, TAlloc > &f, const MPolynomial< 1, TRing, TAlloc > &g, MPolynomial< 1, TRing, TAlloc > &q, MPolynomial< 1, TRing, TAlloc > &r) |
| MPolynomial | operator* (const Ring &v, const MPolynomial &p) |
template<int n, typename TRing, class TAlloc>
class DGtal::MPolynomial< n, TRing, TAlloc >
Aim: Represents a multivariate polynomial, i.e. an element of \( K[X_0, ..., X_{n-1}] \), where K is some ring or field.
Description of template class 'MPolynomial'
Monomials are products of power of variables, like xy^2z^3. Polynomials in n variables are constructed recursively with polynomials in n - 1 variables.
There is a specialization for polynomials with no indeterminates, i.e. constants.
- See also
- dgtal_multivariate_polynomial
- Template Parameters
-
| n | the number of variables or indeterminates. |
| TRing | the type chosen for the polynomial, defines also the type of the coefficients (generally int, float or double). |
| TAlloc | is an allocator for TRing, for example std::allocator<TRing>; this is also the default parameter. Usually this parameter does not needs to be changed. |
This class is a backport from Spielwiese.
- Author
- Felix Fontein (
felix.nosp@m.@fon.nosp@m.tein..nosp@m.de), University of Zurich, Switzerland
- Examples
- math/polynomial-derivative.cpp, math/polynomial-read.cpp, math/polynomial2-derivative.cpp, and topology/trackImplicitPolynomialSurfaceToOFF.cpp.
Definition at line 969 of file MPolynomial.h.
template<int n, typename TRing, class TAlloc>
The type for the vector storing polynomials coefficients. For 0 or 1 variables, uses a standard vector, for more variables, uses a specific vector of pointers to polynomials, with adequate allocators. This is for efficiency purposes.
Definition at line 1000 of file MPolynomial.h.
template<int n, typename TRing, class TAlloc>
Adjusts the size of myValue that the leading term and degree can be computed trivially. This must be called only after calls to the non-const operator[], in which the degree of the polynomial has potentially been changed.
Definition at line 1030 of file MPolynomial.h.
1031 {
1034 {
1037 else
1038 break;
1039 }
1042 }
Referenced by DGtal::MPolynomialDerivativeComputer< N, n, Ring, Alloc >::computeDerivative(), DGtal::MPolynomialDerivativeComputer< 0, n, Ring, Alloc >::computeDerivative(), DGtal::MPolynomial< n - 1, Ring, Alloc >::euclidDiv, DGtal::Xe_kComputer< n, Ring, Alloc >::get(), DGtal::MPolynomial< Space::dimension, Scalar >::operator*(), DGtal::MPolynomial< Space::dimension, Scalar >::operator+(), DGtal::MPolynomial< Space::dimension, Scalar >::operator+(), DGtal::MPolynomial< Space::dimension, Scalar >::operator+(), DGtal::MPolynomial< Space::dimension, Scalar >::operator-(), DGtal::MPolynomial< Space::dimension, Scalar >::operator-(), and DGtal::MPolynomial< Space::dimension, Scalar >::operator-().
template<int n, typename TRing, class TAlloc>
template<typename Ring2, typename Alloc2>
template<int n, typename TRing, class TAlloc>
template<int NN, int nn, typename TT, typename AA>
| friend class MPolynomialDerivativeComputer |
|
friend |
template<int n, typename TRing, class TAlloc>
template<int nn, typename TT, typename AA, typename SS>
| friend class MPolynomialEvaluator |
|
friend |
template<int n, typename TRing, class TAlloc>
template<int nn, typename TT, typename HLHL, typename AA, typename SS>
| friend class MPolynomialEvaluatorImpl |
|
friend |
template<int n, typename TRing, class TAlloc>
The vector storing polynomials coefficients. For 0 or 1 variables, uses a standard vector, for more variables, uses a specific vector of pointers to polynomials, with adequate allocators. This is for efficiency purposes.
Definition at line 1013 of file MPolynomial.h.
Referenced by DGtal::MPolynomialDerivativeComputer< N, n, Ring, Alloc >::computeDerivative(), DGtal::MPolynomialDerivativeComputer< 0, n, Ring, Alloc >::computeDerivative(), DGtal::MPolynomialEvaluator< n, TRing, TAlloc, TX >::evaluate(), DGtal::MPolynomialEvaluator< 1, TRing, TAlloc, TX >::MPolynomial< 1, TRing, TAlloc >, DGtal::MPolynomialEvaluator< n, TRing, TAlloc, TX >::operator MPolyNM1(), DGtal::MPolynomialEvaluator< 1, TRing, TAlloc, TX >::operator X(), DGtal::MPolynomialEvaluatorImpl< n, TRing, TOwner, TAlloc, TX >::EvalFun< XX, Fun >::operator()(), DGtal::MPolynomialEvaluatorImpl< 1, TRing, TOwner, TAlloc, TX >::EvalFun::operator()(), DGtal::MPolynomial< Space::dimension, Scalar >::operator*(), DGtal::MPolynomial< Space::dimension, Scalar >::operator*, DGtal::MPolynomial< Space::dimension, Scalar >::operator+(), DGtal::MPolynomial< Space::dimension, Scalar >::operator+(), DGtal::MPolynomial< Space::dimension, Scalar >::operator+(), DGtal::MPolynomial< Space::dimension, Scalar >::operator+=(), DGtal::MPolynomial< Space::dimension, Scalar >::operator-(), DGtal::MPolynomial< Space::dimension, Scalar >::operator-(), DGtal::MPolynomial< Space::dimension, Scalar >::operator-(), DGtal::MPolynomial< Space::dimension, Scalar >::operator-=(), DGtal::MPolynomial< Space::dimension, Scalar >::operator==(), DGtal::MPolynomial< 0, TRing, TAlloc >::swap(), and DGtal::MPolynomial< Space::dimension, Scalar >::swap().