Package edu.jas.poly

Class PolyIterator<C extends RingElem<C>>

java.lang.Object
edu.jas.poly.PolyIterator<C>
All Implemented Interfaces:
Iterator<Monomial<C>>

public class PolyIterator<C extends RingElem<C>> extends Object implements Iterator<Monomial<C>>
Iterator over monomials of a polynomial. Adaptor for val.entrySet().iterator().
  • Field Details

  • Constructor Details

    • PolyIterator

      public PolyIterator(SortedMap<ExpVector,C> m)
      Constructor of polynomial iterator.
      Parameters:
      m - SortetMap of a polynomial.
  • Method Details

    • hasNext

      public boolean hasNext()
      Test for availability of a next monomial.
      Specified by:
      hasNext in interface Iterator<C extends RingElem<C>>
      Returns:
      true if the iteration has more monomials, else false.
    • next

      public Monomial<C> next()
      Get next monomial element.
      Specified by:
      next in interface Iterator<C extends RingElem<C>>
      Returns:
      next monomial.
    • remove

      public void remove()
      Remove the last monomial returned from underlying set if allowed.
      Specified by:
      remove in interface Iterator<C extends RingElem<C>>