![]() |
OPENF4
Library for Gröebner basis computations over finite fields.
|
Represent a polynomial. More...
#include <polynomial.h>
Public Member Functions | |
| Polynomial () | |
| Constructor. | |
| Polynomial (std::string const s) | |
| Constructor. More... | |
| Polynomial (Polynomial const &polynomial) | |
| Copy constructor. More... | |
| Polynomial (Polynomial &&polynomial) | |
| Move constructor. More... | |
| void | clear () |
| Delete all the terms. | |
| void | deleteAfter (NodeList< Element > *it) |
| Erase all the term from it to the end of the polynomial. More... | |
| void | printPolynomial (std::ostream &stream) const |
| Print the polynomial. | |
| int | getNbTerm () const |
| Get the number of terms of this. More... | |
| const Term< Element > & | getLT () const |
| Get the leading term of this. More... | |
| int | getLM () const |
| Get the number of the leading monomial of this. More... | |
| Element | getLC () const |
| Get the leading coefficient of this. More... | |
| Element | getCoefficient (int numMon) const |
| Get the coefficient of the term of monomial numMon. More... | |
| NodeList< Element > * | getPolynomialBegin () |
| Get an iterator on the beginning of the polynomial. More... | |
| NodeList< Element > * | getPolynomialBeforeBegin () |
| Get an iterator before the beginning of the polynomial. More... | |
| NodeList< Element > const * | getPolynomialBeginConst () const |
| Get a constant iterator on the beginning of the polynomial. More... | |
| void | deleteLT () |
| Delete the leading term of this. | |
| void | normalize () |
| Normalize this. | |
| bool | isEmpty () |
| Test if the polynomial is empty or not. More... | |
| NodeList< Element > * | emplaceAfter (NodeList< Element > *pos, Element coeff, int numMon) |
| Add a term after pos. Beware to keep a correct order. More... | |
| NodeList< Element > * | emplaceOn (NodeList< Element > *pos, Element coeff, int numMon) |
| Add a term after pos. Beware to keep a correct order. More... | |
| Polynomial & | operator= (Polynomial const &polynomial) |
| Overload the operator =. More... | |
| Polynomial & | operator= (Polynomial &&polynomial) |
| Overload the move operator =. More... | |
| Polynomial & | operator*= (Monomial const &monomial) |
| Overload the operator *= to multiply this with a monomial. Prefer multNumMon(int numMon) if the monomial is under integer form. More... | |
| Polynomial & | operator*= (Element element) |
| Overload the operator *= to multiply this with an Element. More... | |
| Polynomial & | operator*= (Term< Element > const &term) |
| Overload the operator *= to multiply this with a term. More... | |
Private Attributes | |
| SingleList< Element > | _polynomial |
Represent a polynomial.
Definition at line 47 of file polynomial.h.
| F4::Polynomial< Element >::Polynomial | ( | std::string const | s | ) |
Constructor.
| s | String representing the polynomial. |
| F4::Polynomial< Element >::Polynomial | ( | Polynomial< Element > const & | polynomial | ) |
Copy constructor.
| polynomial | Polynomial to copy. |
| F4::Polynomial< Element >::Polynomial | ( | Polynomial< Element > && | polynomial | ) |
Move constructor.
| polynomial | Polynomial to move. |
| void F4::Polynomial< Element >::deleteAfter | ( | NodeList< Element > * | it | ) |
Erase all the term from it to the end of the polynomial.
| it | Pointer on a node. |
| NodeList<Element>* F4::Polynomial< Element >::emplaceAfter | ( | NodeList< Element > * | pos, |
| Element | coeff, | ||
| int | numMon | ||
| ) |
Add a term after pos. Beware to keep a correct order.
| pos | iterator, term is contructed after the position specified by pos. |
| coeff | Coefficient of the new term. |
| numMon | Number of the monomial of the new term. |
| NodeList<Element>* F4::Polynomial< Element >::emplaceOn | ( | NodeList< Element > * | pos, |
| Element | coeff, | ||
| int | numMon | ||
| ) |
Add a term after pos. Beware to keep a correct order.
| pos | iterator, term is contructed after the position specified by pos. |
| coeff | Coefficient of the new term. |
| numMon | Number of the monomial of the new term. |
| Element F4::Polynomial< Element >::getCoefficient | ( | int | numMon | ) | const |
Get the coefficient of the term of monomial numMon.
| Element F4::Polynomial< Element >::getLC | ( | ) | const |
Get the leading coefficient of this.
| int F4::Polynomial< Element >::getLM | ( | ) | const |
Get the number of the leading monomial of this.
| const Term<Element>& F4::Polynomial< Element >::getLT | ( | ) | const |
Get the leading term of this.
| int F4::Polynomial< Element >::getNbTerm | ( | ) | const |
Get the number of terms of this.
| NodeList<Element>* F4::Polynomial< Element >::getPolynomialBeforeBegin | ( | ) |
Get an iterator before the beginning of the polynomial.
| NodeList<Element>* F4::Polynomial< Element >::getPolynomialBegin | ( | ) |
Get an iterator on the beginning of the polynomial.
| NodeList<Element> const* F4::Polynomial< Element >::getPolynomialBeginConst | ( | ) | const |
Get a constant iterator on the beginning of the polynomial.
| bool F4::Polynomial< Element >::isEmpty | ( | ) |
Test if the polynomial is empty or not.
| Polynomial& F4::Polynomial< Element >::operator*= | ( | Monomial const & | monomial | ) |
Overload the operator *= to multiply this with a monomial. Prefer multNumMon(int numMon) if the monomial is under integer form.
| mon | Monomial. |
| Polynomial& F4::Polynomial< Element >::operator*= | ( | Element | element | ) |
Overload the operator *= to multiply this with an Element.
| element | Element. |
| Polynomial& F4::Polynomial< Element >::operator*= | ( | Term< Element > const & | term | ) |
Overload the operator *= to multiply this with a term.
| term | Term. |
| Polynomial& F4::Polynomial< Element >::operator= | ( | Polynomial< Element > const & | polynomial | ) |
| Polynomial& F4::Polynomial< Element >::operator= | ( | Polynomial< Element > && | polynomial | ) |
|
private |
Define a polynomial as a single chained list of Terms.
Definition at line 223 of file polynomial.h.
1.8.6