Package edu.jas.gb

Class OrderedPairlist<C extends RingElem<C>>

java.lang.Object
edu.jas.gb.OrderedPairlist<C>
All Implemented Interfaces:
PairList<C>, Serializable
Direct Known Subclasses:
CriticalPairList, OrderedDPairlist, OrderedMinPairlist, OrderedRPairlist, OrderedSyzPairlist

public class OrderedPairlist<C extends RingElem<C>> extends Object implements PairList<C>
Pair list management. The original Buchberger algorithm with criterions following Winkler in SAC-1, Kredel in ALDES/SAC-2, Kredel in MAS. Implemented using GenPolynomial, TreeMap and BitSet.
See Also:
  • Field Details

  • Constructor Details

    • OrderedPairlist

      public OrderedPairlist()
      Constructor.
    • OrderedPairlist

      public OrderedPairlist(GenPolynomialRing<C> r)
      Constructor.
      Parameters:
      r - polynomial factory.
    • OrderedPairlist

      public OrderedPairlist(int m, GenPolynomialRing<C> r)
      Constructor.
      Parameters:
      m - number of module variables.
      r - polynomial factory.
  • Method Details

    • create

      public PairList<C> create(GenPolynomialRing<C> r)
      Create a new PairList.
      Specified by:
      create in interface PairList<C extends RingElem<C>>
      Parameters:
      r - polynomial ring.
    • create

      public PairList<C> create(int m, GenPolynomialRing<C> r)
      Create a new PairList.
      Specified by:
      create in interface PairList<C extends RingElem<C>>
      Parameters:
      m - number of module variables.
      r - polynomial ring.
    • getRing

      public GenPolynomialRing<C> getRing()
      Get polynomial ring.
      Specified by:
      getRing in interface PairList<C extends RingElem<C>>
      Returns:
      the polynomial ring.
    • toString

      public String toString()
      toString.
      Specified by:
      toString in interface PairList<C extends RingElem<C>>
      Overrides:
      toString in class Object
    • put

      public int put(GenPolynomial<C> p)
      Put one Polynomial to the pairlist and reduction matrix.
      Specified by:
      put in interface PairList<C extends RingElem<C>>
      Parameters:
      p - polynomial.
      Returns:
      the index of the added polynomial.
    • put

      public int put(List<GenPolynomial<C>> F)
      Put all polynomials in F to the pairlist and reduction matrix.
      Specified by:
      put in interface PairList<C extends RingElem<C>>
      Parameters:
      F - polynomial list.
      Returns:
      the index of the last added polynomial.
    • removeNext

      public Pair<C> removeNext()
      Remove the next required pair from the pairlist and reduction matrix. Apply the criterions 3 and 4 to see if the S-polynomial is required.
      Specified by:
      removeNext in interface PairList<C extends RingElem<C>>
      Returns:
      the next pair if one exists, otherwise null.
    • hasNext

      public boolean hasNext()
      Test if there is possibly a pair in the list.
      Specified by:
      hasNext in interface PairList<C extends RingElem<C>>
      Returns:
      true if a next pair could exist, otherwise false.
    • getList

      public List<GenPolynomial<C>> getList()
      Get the list of polynomials.
      Specified by:
      getList in interface PairList<C extends RingElem<C>>
      Returns:
      the polynomial list.
    • setList

      public void setList(List<GenPolynomial<C>> F)
      Set the list of polynomials.
      Specified by:
      setList in interface PairList<C extends RingElem<C>>
      Parameters:
      F - the polynomial list.
    • size

      public int size()
      Get the size of the list of polynomials.
      Specified by:
      size in interface PairList<C extends RingElem<C>>
      Returns:
      size of the polynomial list.
    • putCount

      public int putCount()
      Get the number of polynomials put to the pairlist.
      Specified by:
      putCount in interface PairList<C extends RingElem<C>>
      Returns:
      the number of calls to put.
    • remCount

      public int remCount()
      Get the number of required pairs removed from the pairlist.
      Specified by:
      remCount in interface PairList<C extends RingElem<C>>
      Returns:
      the number of non null pairs delivered.
    • putOne

      public int putOne(GenPolynomial<C> one)
      Put the ONE-Polynomial to the pairlist.
      Parameters:
      one - polynomial. (no more required)
      Returns:
      the index of the last polynomial.
    • putOne

      public int putOne()
      Put the ONE-Polynomial to the pairlist.
      Specified by:
      putOne in interface PairList<C extends RingElem<C>>
      Returns:
      the index of the last polynomial.
    • criterion3

      public boolean criterion3(int i, int j, ExpVector eij)
      GB criterium 3.
      Specified by:
      criterion3 in interface PairList<C extends RingElem<C>>
      Returns:
      true if the S-polynomial(i,j) is required.