Package edu.jas.application
Class OrderedCPairlist<C extends GcdRingElem<C>>
- java.lang.Object
-
- edu.jas.application.OrderedCPairlist<C>
-
- All Implemented Interfaces:
java.io.Serializable
public class OrderedCPairlist<C extends GcdRingElem<C>> extends java.lang.Object implements java.io.Serializable
Pair list management. Implemented for ColorPolynomials using TreeMap and BitSet.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
moduleVars
protected boolean
oneInGB
protected java.util.List<ColorPolynomial<C>>
P
protected java.util.SortedMap<ExpVector,java.util.LinkedList<CPair<C>>>
pairlist
protected int
putCount
protected java.util.List<java.util.BitSet>
red
protected CReductionSeq<C>
reduction
protected int
remCount
protected GenPolynomialRing<GenPolynomial<C>>
ring
protected boolean
useCriterion4
-
Constructor Summary
Constructors Constructor Description OrderedCPairlist(int m, GenPolynomialRing<GenPolynomial<C>> r)
Constructor for OrderedPairlist.OrderedCPairlist(GenPolynomialRing<GenPolynomial<C>> r)
Constructor for OrderedPairlist.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bitCount()
bitCount.OrderedCPairlist<C>
copy()
Clone this OrderedPairlist.boolean
criterion3(int i, int j, ExpVector eij)
GB criterium 3.boolean
equals(java.lang.Object ob)
Equals.java.util.List<ColorPolynomial<C>>
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
pairCount()
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.CPair<C>
removeNext()
Remove the next required pair from the pairlist and reduction matrix.java.lang.String
toString()
toString.
-
-
-
Field Detail
-
ring
protected final GenPolynomialRing<GenPolynomial<C extends GcdRingElem<C>>> ring
-
P
protected final java.util.List<ColorPolynomial<C extends GcdRingElem<C>>> P
-
pairlist
protected final java.util.SortedMap<ExpVector,java.util.LinkedList<CPair<C extends GcdRingElem<C>>>> pairlist
-
red
protected final java.util.List<java.util.BitSet> red
-
reduction
protected final CReductionSeq<C extends GcdRingElem<C>> reduction
-
oneInGB
protected boolean oneInGB
-
useCriterion4
protected boolean useCriterion4
-
putCount
protected int putCount
-
remCount
protected int remCount
-
moduleVars
protected final int moduleVars
-
-
Constructor Detail
-
OrderedCPairlist
public OrderedCPairlist(GenPolynomialRing<GenPolynomial<C>> r)
Constructor for OrderedPairlist.- Parameters:
r
- polynomial factory.
-
OrderedCPairlist
public OrderedCPairlist(int m, GenPolynomialRing<GenPolynomial<C>> r)
Constructor for OrderedPairlist.- Parameters:
m
- number of module variables.r
- polynomial factory.
-
-
Method Detail
-
copy
public OrderedCPairlist<C> copy()
Clone this OrderedPairlist.- Returns:
- a 2 level clone of this.
-
pairCount
public int pairCount()
Count remaining Pairs.- Returns:
- number of pairs remaining in this pairlist.
-
bitCount
public int bitCount()
bitCount.- Returns:
- number of bits set in this bitset.
-
toString
public java.lang.String toString()
toString.- Overrides:
toString
in classjava.lang.Object
- Returns:
- counters of this.
-
equals
public boolean equals(java.lang.Object ob)
Equals.- Overrides:
equals
in classjava.lang.Object
- Parameters:
ob
- an Object.- Returns:
- true if this is equal to o, else false.
-
hashCode
public int hashCode()
Hash code for this pair list.- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
put
public int put(ColorPolynomial<C> p)
Put one Polynomial to the pairlist and reduction matrix.- Parameters:
p
- polynomial.- Returns:
- the index of the added polynomial.
-
removeNext
public CPair<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.- 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
public java.util.List<ColorPolynomial<C>> 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
public int putOne(ColorPolynomial<C> one)
Put to ONE-Polynomial to the pairlist.- Parameters:
one
- polynomial. (no more required)- Returns:
- the index of the last polynomial.
-
criterion3
public boolean criterion3(int i, int j, ExpVector eij)
GB criterium 3.- Returns:
- true if the S-polynomial(i,j) is required.
-
-