26 #ifndef OPENF4_SINGLE_LIST_H
27 #define OPENF4_SINGLE_LIST_H
46 template <
typename Element>
61 NodeList(Element coefficient,
int numMonomial);
116 template <
typename Element>
272 template <
typename Element>
273 std::ostream & operator<<(std::ostream & stream, SingleList<Element>
const & list);
277 #include "../src/single-list.inl"
280 #endif // OPENF4_SINGLE_LIST_H
NodeList< Element > * getBeforeBegin()
Return an iterator before the first element.
Element getCoefficient() const
Get the coefficient of the term.
NodeList< Element > * insertAfter(NodeList< Element > *it, Term< Element > const &term)
Construct a term in place after the node pointed by it.
void setCoefficient(Element element)
Set the coefficient of the term.
NodeList< Element > * getBegin() const
Return an iterator to the first element.
NodeList< Element > * insertBegin(Term< Element > const &term)
Construct a term in place at the beginning of the list.
int getNumMonomial() const
Get the number of the monomial of the term.
Term< Element > const & getTerm() const
Get the term of the node.
Represent a single chained list.
bool empty() const
Test if the list is empty.
Wrapper for config.h in order to avoid multiple definitions.
void clear()
Erase all the terms.
void setNumMonomial(int numMonomial)
Set the number of the monomial of the term.
NodeList< Element > * emplaceBegin(Element coefficient, int numMonomial)
Construct a term in place at the beginning of the list.
NodeList< Element > * popFront()
Remove the first element.
void deleteAfter(NodeList< Element > *it)
Erase all the terms after it, set it->_next to 0.
void printList(ostream &stream) const
Print the list.
Represent a node of the single chained list.
void setCoefficientOne()
Set the coefficient of the term to one.
Declaration of class Term.
NodeList< Element > * _beforeBegin
NodeList< Element > * emplaceAfter(NodeList< Element > *it, Element coefficient, int numMonomial)
Construct a term in place after the node pointed by it.
NodeList< Element > * _list
NodeList< Element > * emplaceOn(NodeList< Element > *it, Element coefficient, int numMonomial)
Construct a term in place after the node pointed by it.
int getNbTerms() const
Get the number of terms.
SingleList & operator=(SingleList const &toCopy)
Overload the operator =.
Term< Element > const & front() const
Get the first term of the list.