Package edu.jas.gb
Class OrderedWordPairlist<C extends RingElem<C>>
java.lang.Object
edu.jas.gb.OrderedWordPairlist<C>
- All Implemented Interfaces:
WordPairList<C>
Pair list management of word polynomials. Implemented using
GenWordPolynomial, TreeMap and BitSet.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Logger
protected boolean
protected final List
<GenWordPolynomial<C>> protected final SortedMap
<Word, LinkedList<WordPair<C>>> protected int
protected final WordReduction
<C> protected int
protected final GenWordPolynomialRing
<C> -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreate a new WordPairList.boolean
criterion3
(int i, int j, Word eij) GB criterium 3.getList()
Get the list of polynomials.boolean
hasNext()
Test if there is possibly a pair in the list.int
put
(GenWordPolynomial<C> p) Put one Polynomial to the pairlist and reduction matrix.int
put
(List<GenWordPolynomial<C>> F) Put all word polynomials in F to the pairlist and reduction matrix.int
putCount()
Get the number of polynomials put to the pairlist.int
putOne()
Put the ONE-Polynomial to the pairlist.int
putOne
(GenWordPolynomial<C> one) Put the 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
-
P
-
pairlist
-
red
-
ring
-
reduction
-
oneInGB
protected boolean oneInGB -
putCount
protected int putCount -
remCount
protected int remCount -
logger
private static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
OrderedWordPairlist
public OrderedWordPairlist()Constructor. -
OrderedWordPairlist
Constructor.- Parameters:
r
- word polynomial factory.
-
-
Method Details
-
create
Create a new WordPairList.- Specified by:
create
in interfaceWordPairList<C extends RingElem<C>>
- Parameters:
r
- word polynomial ring.
-
toString
toString. -
put
Put one Polynomial to the pairlist and reduction matrix.- Specified by:
put
in interfaceWordPairList<C extends RingElem<C>>
- Parameters:
p
- polynomial.- Returns:
- the index of the added polynomial.
-
put
Put all word polynomials in F to the pairlist and reduction matrix.- Specified by:
put
in interfaceWordPairList<C extends RingElem<C>>
- Parameters:
F
- word polynomial list.- Returns:
- the index of the last added word polynomial.
-
removeNext
Remove the next required pair from the pairlist and reduction matrix. Apply the criterion 3 to see if the S-polynomial is required.- Specified by:
removeNext
in interfaceWordPairList<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 interfaceWordPairList<C extends RingElem<C>>
- Returns:
- true if a next pair could exist, otherwise false.
-
getList
Get the list of polynomials.- Specified by:
getList
in interfaceWordPairList<C extends RingElem<C>>
- Returns:
- the polynomial list.
-
putCount
public int putCount()Get the number of polynomials put to the pairlist.- Specified by:
putCount
in interfaceWordPairList<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 interfaceWordPairList<C extends RingElem<C>>
- Returns:
- the number of non null pairs delivered.
-
putOne
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 interfaceWordPairList<C extends RingElem<C>>
- Returns:
- the index of the last polynomial.
-
criterion3
GB criterium 3.- Returns:
- true if the S-polynomial(i,j) is required.
-