Gröbner basis project
Codebase for research into Gröbner basis computation
|
Iterator over double-buffered polynomials. More...
#include <polynomial_double_buffered.hpp>
Public Member Functions | |
Construction | |
DB_Polynomial_Iterator (const Double_Buffered_Polynomial *f, bool at_end=false) | |
Destruction | |
~DB_Polynomial_Iterator () | |
Iteration | |
virtual void | restart_iteration () |
This should move the iterator to the leading term. | |
virtual void | moveRight () |
Moves right in the polynomial, to the next smaller monomial. | |
virtual void | moveLeft () |
Moves left in the polynomial, to the next larger monomial. | |
virtual bool | fellOff () const |
Reports true iff the iterator no longer points to a valid monomial. More... | |
virtual bool | canMoveLeft () const |
Can this iterator move left, or would it fall off? | |
virtual bool | canMoveRight () const |
Can this iterator move right, or would it fall off? | |
Data access | |
virtual const Monomial & | currMonomial () const |
Reports the monomial at the current position. | |
virtual const Prime_Field_Element & | currCoeff () const |
Reports the coefficient at the current position. | |
Data modification | |
virtual void | set_currCoeff (const Prime_Field_Element &a) |
change coefficient in current position | |
virtual void | set_currMonomial (const Monomial &t) |
change monomial in current position | |
Data modification | |
![]() | |
virtual | ~Polynomial_Iterator ()=0 |
needed to avoid undefined behavior when disposing | |
const Polynomial_Iterator & | operator++ () |
Moves right in the polynomial, to the next smaller monomial. | |
virtual const Abstract_Polynomial * | my_poly () const |
Reports the polynomial on which this is iterating. | |
const Polynomial_Term | operator* () const |
C++11 iteration. | |
virtual bool | operator!= (const Polynomial_Iterator &other) const |
Protected Attributes | |
Prime_Field_Element * | A |
pointer to coefficients | |
long long | current_position |
current position in the list | |
unsigned | head |
position of first monomial | |
Monomial * | T |
pointer to monomials | |
unsigned | tail |
position of last monomial | |
![]() | |
const Abstract_Polynomial * | p |
the polynomial this points to | |
Iterator over double-buffered polynomials.
Definition at line 21 of file polynomial_double_buffered.hpp.
|
virtual |
Reports true iff the iterator no longer points to a valid monomial.
This is NOT the same as pointing to a monomial with coefficient zero; this is true when the iterator would probably report inaccurate data.
Implements Polynomial_Iterator.
Definition at line 14 of file polynomial_double_buffered.cpp.