OPENF4
Library for Gröebner basis computations over finite fields.
|
Represent a single chained list. More...
#include <single-list.h>
Public Member Functions | |
SingleList () | |
Constructor. | |
SingleList (SingleList const &toCopy) | |
Copy constructor. | |
SingleList (SingleList &&toCopy) | |
Move constructor. | |
~SingleList () | |
Destructor. | |
void | clear () |
Erase all the terms. | |
void | deleteAfter (NodeList< Element > *it) |
Erase all the terms after it, set it->_next to 0. More... | |
NodeList< Element > * | getBegin () const |
Return an iterator to the first element. More... | |
NodeList< Element > * | getBeforeBegin () |
Return an iterator before the first element. More... | |
bool | empty () const |
Test if the list is empty. More... | |
int | getNbTerms () const |
Get the number of terms. More... | |
Term< Element > const & | front () const |
Get the first term of the list. More... | |
NodeList< Element > * | emplaceBegin (Element coefficient, int numMonomial) |
Construct a term in place at the beginning of the list. More... | |
NodeList< Element > * | emplaceAfter (NodeList< Element > *it, Element coefficient, int numMonomial) |
Construct a term in place after the node pointed by it. More... | |
NodeList< Element > * | emplaceOn (NodeList< Element > *it, Element coefficient, int numMonomial) |
Construct a term in place after the node pointed by it. More... | |
NodeList< Element > * | insertBegin (Term< Element > const &term) |
Construct a term in place at the beginning of the list. More... | |
NodeList< Element > * | insertAfter (NodeList< Element > *it, Term< Element > const &term) |
Construct a term in place after the node pointed by it. More... | |
void | printList (ostream &stream) const |
Print the list. | |
NodeList< Element > * | popFront () |
Remove the first element. More... | |
SingleList & | operator= (SingleList const &toCopy) |
Overload the operator =. More... | |
SingleList & | operator= (SingleList &&toCopy) |
Overload the operator =. More... | |
Private Attributes | |
NodeList< Element > * | _list |
NodeList< Element > * | _beforeBegin |
int | _nbTerms |
Represent a single chained list.
Definition at line 117 of file single-list.h.
void F4::SingleList< Element >::deleteAfter | ( | NodeList< Element > * | it | ) |
Erase all the terms after it, set it->_next to 0.
it | Pointer on a node. |
NodeList<Element>* F4::SingleList< Element >::emplaceAfter | ( | NodeList< Element > * | it, |
Element | coefficient, | ||
int | numMonomial | ||
) |
Construct a term in place after the node pointed by it.
it | Pointer on a node. |
coefficient | Coefficient of the term. |
numMonomial | Number of the monomial of the term. |
NodeList<Element>* F4::SingleList< Element >::emplaceBegin | ( | Element | coefficient, |
int | numMonomial | ||
) |
Construct a term in place at the beginning of the list.
coefficient | Coefficient of the term. |
numMonomial | Number of the monomial of the term. |
NodeList<Element>* F4::SingleList< Element >::emplaceOn | ( | NodeList< Element > * | it, |
Element | coefficient, | ||
int | numMonomial | ||
) |
Construct a term in place after the node pointed by it.
it | Pointer on a node. |
coefficient | Coefficient of the term. |
numMonomial | Number of the monomial of the term. |
bool F4::SingleList< Element >::empty | ( | ) | const |
Test if the list is empty.
Term<Element> const& F4::SingleList< Element >::front | ( | ) | const |
Get the first term of the list.
NodeList<Element>* F4::SingleList< Element >::getBeforeBegin | ( | ) |
Return an iterator before the first element.
NodeList<Element>* F4::SingleList< Element >::getBegin | ( | ) | const |
Return an iterator to the first element.
int F4::SingleList< Element >::getNbTerms | ( | ) | const |
Get the number of terms.
NodeList<Element>* F4::SingleList< Element >::insertAfter | ( | NodeList< Element > * | it, |
Term< Element > const & | term | ||
) |
Construct a term in place after the node pointed by it.
it | Pointer on a node. |
term | Term to insert. |
NodeList<Element>* F4::SingleList< Element >::insertBegin | ( | Term< Element > const & | term | ) |
Construct a term in place at the beginning of the list.
term | Term to insert. |
SingleList& F4::SingleList< Element >::operator= | ( | SingleList< Element > const & | toCopy | ) |
Overload the operator =.
toCopy | List to copy. |
SingleList& F4::SingleList< Element >::operator= | ( | SingleList< Element > && | toCopy | ) |
Overload the operator =.
toCopy | List to move. |
NodeList<Element>* F4::SingleList< Element >::popFront | ( | ) |
Remove the first element.
|
private |
Before the head of the list.
Definition at line 264 of file single-list.h.
|
private |
Head of the list.
Definition at line 263 of file single-list.h.
|
private |
Number of terms of the list.
Definition at line 265 of file single-list.h.