Class CriticalPairList<C extends RingElem<C>>
java.lang.Object
edu.jas.gb.OrderedPairlist<C>
edu.jas.gb.CriticalPairList<C>
- All Implemented Interfaces:
PairList<C>, Serializable
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.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Loggerprotected final SortedSet<CriticalPair<C>> protected intFields inherited from class OrderedPairlist
moduleVars, oneInGB, P, putCount, red, reduction, remCount, ring, useCriterion4 -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for CriticalPairList.CriticalPairList(int m, GenPolynomialRing<C> r) Constructor for CriticalPairList.Constructor for CriticalPairList. -
Method Summary
Modifier and TypeMethodDescriptioncreate(int m, GenPolynomialRing<C> r) Create a new PairList.create(GenPolynomialRing<C> r) Create a new PairList.getNext()Get the next required pair from the pairlist.booleanhasNext()Test if there is possibly a pair in the list.inWork()In work pairs.intput(GenPolynomial<C> p) Put a polynomial to the pairlist and reduction matrix.intputOne()Put the ONE-Polynomial to the pairlist.intrecord(CriticalPair<C> pair, GenPolynomial<C> p) Record reduced polynomial.Get and remove the next required pair from the pairlist.intupdate()Update pairlist.intupdate(CriticalPair<C> pair, GenPolynomial<C> p) Record reduced polynomial and update critical pair list.intUpdate pairlist, several pairs at once.
-
Field Details
-
pairlist
-
recordCount
protected int recordCount -
logger
private static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
CriticalPairList
public CriticalPairList()Constructor for CriticalPairList. -
CriticalPairList
Constructor for CriticalPairList.- Parameters:
r- polynomial factory.
-
CriticalPairList
Constructor for CriticalPairList.- Parameters:
m- number of module variables.r- polynomial factory.
-
-
Method Details
-
create
-
create
-
put
-
hasNext
-
removeNext
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:
removeNextin interfacePairList<C extends RingElem<C>>- Overrides:
removeNextin classOrderedPairlist<C extends RingElem<C>>- Returns:
- the next pair if one exists, otherwise null.
-
getNext
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
Record reduced polynomial.- Parameters:
pair- the corresponding critical pair.p- polynomial.- Returns:
- index of recorded polynomial, or -1 if not added.
-
update
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
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.
-
putOne
-