Package edu.jas.gb

Class CriticalPairList<C extends RingElem<C>>

  • All Implemented Interfaces:
    PairList<C>, java.io.Serializable

    public class CriticalPairList<C extends RingElem<C>>
    extends OrderedPairlist<C>
    Critical pair list management. Makes some effort to produce the same sequence of critical pairs as in the sequential case, when used in parallel. However already reduced pairs are not re-reduced if new polynomials appear. Implemented using GenPolynomial, SortedSet / TreeSet and BitSet.
    Author:
    Heinz Kredel
    See Also:
    Serialized Form
    • Method Detail

      • removeNext

        public Pair<CremoveNext()
        Get and remove the next required pair from the pairlist. Apply the criterions 3 and 4 to see if the S-polynomial is required. The pair is not removed from the pair list.
        Specified by:
        removeNext in interface PairList<C extends RingElem<C>>
        Overrides:
        removeNext in class OrderedPairlist<C extends RingElem<C>>
        Returns:
        the next pair if one exists, otherwise null.
      • getNext

        public CriticalPair<CgetNext()
        Get the next required pair from the pairlist. Apply the criterions 3 and 4 to see if the S-polynomial is required. The pair is not removed from the pair list.
        Returns:
        the next pair if one exists, otherwise null.
      • record

        public int record​(CriticalPair<C> pair,
                          GenPolynomial<C> p)
        Record reduced polynomial.
        Parameters:
        pair - the corresponding critical pair.
        p - polynomial.
        Returns:
        index of recorded polynomial, or -1 if not added.
      • update

        public int update​(CriticalPair<C> pair,
                          GenPolynomial<C> p)
        Record reduced polynomial and update critical pair list. Note: it is better to use record and uptate separately.
        Parameters:
        pair - the corresponding critical pair.
        p - polynomial.
        Returns:
        index of recorded polynomial
      • update

        public int update()
        Update pairlist. Preserve the sequential pair sequence. Remove pairs with completed reductions.
        Returns:
        the number of added polynomials.
      • inWork

        public java.util.List<CriticalPair<C>> inWork()
        In work pairs. List pairs which are currently reduced.
        Returns:
        list of critical pairs which are in reduction.
      • updateMany

        public int updateMany()
        Update pairlist, several pairs at once. This version does not preserve the sequential pair sequence. Remove pairs with completed reductions.
        Returns:
        the number of added polynomials.