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

Iterator over linked list polynomials. More...

#include <polynomial_linked_list.hpp>

Inheritance diagram for LLPolynomial_Iterator:
Mutable_Polynomial_Iterator Polynomial_Iterator

Public Member Functions

Construction
 LLPolynomial_Iterator (Polynomial_Linked_List *poly, bool at_end=false)
 Initializes at the leading monomial.
 
 LLPolynomial_Iterator (const Polynomial_Linked_List *poly, bool at_end=false)
 Initializes at the leading monomial.
 
Iteration
virtual void restart_iteration ()
 Initializes at the leading monomial.
 
virtual void moveRight ()
 Returns the monomial the iterator currently points to. More...
 
virtual void moveLeft ()
 Moves the iterator left: to the next larger monomial.
 
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?
 
virtual bool fellOff () const
 true iff the iterator no longer points to a valid monomial.
 
Data access
virtual const MonomialcurrMonomial () const
 Reports the monomial at the current position.
 
virtual const Prime_Field_ElementcurrCoeff () const
 Returns the coefficient of the monomial the iterator currently points to.
 
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
 

Data modification

Polynomial_Linked_Listp
 @ More...
 
Monomial_Nodeiter_curr
 the node at which we have stopped
 
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
 

Additional Inherited Members

- Protected Attributes inherited from Polynomial_Iterator
const Abstract_Polynomialp
 the polynomial this points to
 

Detailed Description

Iterator over linked list polynomials.

Author
John Perry
Date
2015

Definition at line 85 of file polynomial_linked_list.hpp.

Member Function Documentation

◆ moveRight()

void LLPolynomial_Iterator::moveRight ( )
virtual

Returns the monomial the iterator currently points to.

Moves the iterator right: to the next smaller monomial.

Implements Polynomial_Iterator.

Definition at line 36 of file polynomial_linked_list.cpp.

Member Data Documentation

◆ p

Polynomial_Linked_List* LLPolynomial_Iterator::p
protected

@

the polynomial over which we iterate

Definition at line 142 of file polynomial_linked_list.hpp.


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