Package edu.jas.application
Class OrderedCPairlist<C extends GcdRingElem<C>>
java.lang.Object
edu.jas.application.OrderedCPairlist<C>
- All Implemented Interfaces:
Serializable
Pair list management. Implemented for ColorPolynomials using TreeMap and
BitSet.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Logger
protected final int
protected boolean
protected final List
<ColorPolynomial<C>> protected final SortedMap
<ExpVector, LinkedList<CPair<C>>> protected int
protected final CReductionSeq
<C> protected int
protected final GenPolynomialRing
<GenPolynomial<C>> protected boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionOrderedCPairlist
(int m, GenPolynomialRing<GenPolynomial<C>> r) Constructor for OrderedPairlist.private
OrderedCPairlist
(int m, GenPolynomialRing<GenPolynomial<C>> r, List<ColorPolynomial<C>> P, SortedMap<ExpVector, LinkedList<CPair<C>>> pl, List<BitSet> red, CReductionSeq<C> cred, int pc, int rc) Internal constructor for OrderedPairlist.Constructor for OrderedPairlist. -
Method Summary
Modifier and TypeMethodDescriptionint
bitCount()
bitCount.Clone this reduction BitSet.private SortedMap
<ExpVector, LinkedList<CPair<C>>> Clone this pairlist.copy()
Clone this OrderedPairlist.boolean
criterion3
(int i, int j, ExpVector eij) GB criterium 3.boolean
Equals.getList()
Get the list of polynomials.int
hashCode()
Hash code for this pair list.boolean
hasNext()
Test if there is possibly a pair in the list.int
Count remaining Pairs.int
put
(ColorPolynomial<C> p) Put one Polynomial to the pairlist and reduction matrix.int
putCount()
Get the number of polynomials put to the pairlist.int
putOne
(ColorPolynomial<C> one) Put to ONE-Polynomial to the pairlist.int
remCount()
Get the number of required pairs removed from the pairlist.Remove the next required pair from the pairlist and reduction matrix.toString()
toString.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
ring
-
P
-
pairlist
-
red
-
reduction
-
oneInGB
protected boolean oneInGB -
useCriterion4
protected boolean useCriterion4 -
putCount
protected int putCount -
remCount
protected int remCount -
moduleVars
protected final int moduleVars
-
-
Constructor Details
-
OrderedCPairlist
Constructor for OrderedPairlist.- Parameters:
r
- polynomial factory.
-
OrderedCPairlist
Constructor for OrderedPairlist.- Parameters:
m
- number of module variables.r
- polynomial factory.
-
OrderedCPairlist
private OrderedCPairlist(int m, GenPolynomialRing<GenPolynomial<C>> r, List<ColorPolynomial<C>> P, SortedMap<ExpVector, LinkedList<CPair<C>>> pl, List<BitSet> red, CReductionSeq<C> cred, int pc, int rc) Internal constructor for OrderedPairlist. Used to clone this pair list.- Parameters:
m
- number of module variables.r
- polynomial factory.P
- list of color polynomials.pl
- critical pair list.red
- reduction matrix.cred
- color polynomial reduction engine.pc
- put count.rc
- remove count.
-
-
Method Details
-
copy
Clone this OrderedPairlist.- Returns:
- a 2 level clone of this.
-
clonePairlist
Clone this pairlist.- Returns:
- a 2 level clone of this pairlist.
-
pairCount
public int pairCount()Count remaining Pairs.- Returns:
- number of pairs remaining in this pairlist.
-
cloneBitSet
Clone this reduction BitSet.- Returns:
- a 2 level clone of this reduction BitSet.
-
bitCount
public int bitCount()bitCount.- Returns:
- number of bits set in this bitset.
-
toString
toString. -
equals
Equals. -
hashCode
public int hashCode()Hash code for this pair list. -
put
Put one Polynomial to the pairlist and reduction matrix.- Parameters:
p
- polynomial.- Returns:
- the index of the added polynomial.
-
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.- Returns:
- the next pair if one exists, otherwise null.
-
hasNext
public boolean hasNext()Test if there is possibly a pair in the list.- Returns:
- true if a next pair could exist, otherwise false.
-
getList
Get the list of polynomials.- Returns:
- the polynomial list.
-
putCount
public int putCount()Get the number of polynomials put to the pairlist.- Returns:
- the number of calls to put.
-
remCount
public int remCount()Get the number of required pairs removed from the pairlist.- Returns:
- the number of non null pairs delivered.
-
putOne
Put to ONE-Polynomial to the pairlist.- Parameters:
one
- polynomial. (no more required)- Returns:
- the index of the last polynomial.
-
criterion3
GB criterium 3.- Returns:
- true if the S-polynomial(i,j) is required.
-