Gröbner basis project
Codebase for research into Gröbner basis computation
Geobucket_Iterator Class Reference

Iterates through polynomials using a geobucket representation. See Mutable_Polynomial_Iterator for details on methods. More...

#include <polynomial_geobucket.hpp>

Inheritance diagram for Geobucket_Iterator:
Mutable_Polynomial_Iterator Polynomial_Iterator

Public Member Functions

Construction
 Geobucket_Iterator (const Polynomial_Geobucket *, bool at_end=false)
 
 Geobucket_Iterator (Polynomial_Geobucket *, bool at_end=false)
 
Destruction
 ~Geobucket_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 canMoveRight () const
 Can this iterator move right, or would it fall off?
 
virtual bool canMoveLeft () const
 Can this iterator move left, or would it fall off?
 
virtual bool fellOff () const
 Reports true iff the iterator no longer points to a valid monomial. More...
 
Data access
virtual const MonomialcurrMonomial () const
 Reports the monomial at the current position.
 
virtual const Prime_Field_ElementcurrCoeff () 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
- Public Member Functions inherited from Polynomial_Iterator
virtual ~Polynomial_Iterator ()=0
 needed to avoid undefined behavior when disposing
 
const Polynomial_Iteratoroperator++ ()
 Moves right in the polynomial, to the next smaller monomial.
 
virtual const Abstract_Polynomialmy_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

unsigned bucket_number
 the bucket number at which we’re stopped
 
Polynomial_Geobucketg
 to save myself the hassle of static_cast<const Polynomial_Geobucket *>(p) every time I turn around
 
LLPolynomial_Iteratorpi
 an iterator for the current bucket
 
- Protected Attributes inherited from Polynomial_Iterator
const Abstract_Polynomialp
 the polynomial this points to
 

Detailed Description

Iterates through polynomials using a geobucket representation. See Mutable_Polynomial_Iterator for details on methods.

Author
John Perry
Date
2015

Implementation based on [4].

Warning
A polynomial in geobucket representation may not be fully simplified. Clients must not expect the monomials to be in any sort of order, and multiple instances of a monomial are possible. Geobuckets collapse only at canonicalization.

Definition at line 41 of file polynomial_geobucket.hpp.

Member Function Documentation

◆ fellOff()

bool Geobucket_Iterator::fellOff ( ) const
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_geobucket.cpp.


The documentation for this class was generated from the following files: