Gröbner basis project
Codebase for research into Gröbner basis computation
|
An iterator to modify monomials and coefficients of a Constant_Polynomial. More...
#include <polynomial_array.hpp>
Public Member Functions | |
Construction | |
Mutable_Constant_Polynomial_Iterator (Constant_Polynomial *poly) | |
Creates an iterator for poly and starts at its leading term. | |
Destruction | |
~Mutable_Constant_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... | |
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 bool | canMoveRight () const =0 |
Can this iterator move right, or would it fall off? | |
virtual bool | canMoveLeft () const =0 |
Can this iterator move left, or would it fall off? | |
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 | |
long long | i |
the monomial we currently point to | |
Constant_Polynomial * | p |
the polynomial over which we iterate | |
![]() | |
const Abstract_Polynomial * | p |
the polynomial this points to | |
An iterator to modify monomials and coefficients of a Constant_Polynomial.
Sometimes we want to be able to change particular monomials in a Constant_Polynomial. This a bit naughty, since it violates the spirit of a Constant_Polynomial. I guess I need a different name for the latter. This generally mimics a Constant_Polynomial_Iterator, but cannot inherit from it due to issues with the const
keyword. This may reflect bad design.
Definition at line 186 of file polynomial_array.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 233 of file polynomial_array.cpp.