Package edu.jas.gb
Class OrderedWordPairlist<C extends RingElem<C>>
- java.lang.Object
-
- edu.jas.gb.OrderedWordPairlist<C>
-
- All Implemented Interfaces:
WordPairList<C>
public class OrderedWordPairlist<C extends RingElem<C>> extends java.lang.Object implements WordPairList<C>
Pair list management of word polynomials. Implemented using GenWordPolynomial, TreeMap and BitSet.- Author:
- Heinz Kredel
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanoneInGBprotected java.util.List<GenWordPolynomial<C>>Pprotected java.util.SortedMap<Word,java.util.LinkedList<WordPair<C>>>pairlistprotected intputCountprotected java.util.List<java.util.BitSet>redprotected WordReduction<C>reductionprotected intremCountprotected GenWordPolynomialRing<C>ring
-
Constructor Summary
Constructors Constructor Description OrderedWordPairlist()Constructor.OrderedWordPairlist(GenWordPolynomialRing<C> r)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WordPairList<C>create(GenWordPolynomialRing<C> r)Create a new WordPairList.booleancriterion3(int i, int j, Word eij)GB criterium 3.java.util.List<GenWordPolynomial<C>>getList()Get the list of polynomials.booleanhasNext()Test if there is possibly a pair in the list.intput(GenWordPolynomial<C> p)Put one Polynomial to the pairlist and reduction matrix.intput(java.util.List<GenWordPolynomial<C>> F)Put all word polynomials in F to the pairlist and reduction matrix.intputCount()Get the number of polynomials put to the pairlist.intputOne()Put the ONE-Polynomial to the pairlist.intputOne(GenWordPolynomial<C> one)Put the ONE-Polynomial to the pairlist.intremCount()Get the number of required pairs removed from the pairlist.WordPair<C>removeNext()Remove the next required pair from the pairlist and reduction matrix.java.lang.StringtoString()toString.
-
-
-
Field Detail
-
P
protected final java.util.List<GenWordPolynomial<C extends RingElem<C>>> P
-
pairlist
protected final java.util.SortedMap<Word,java.util.LinkedList<WordPair<C extends RingElem<C>>>> pairlist
-
red
protected final java.util.List<java.util.BitSet> red
-
ring
protected final GenWordPolynomialRing<C extends RingElem<C>> ring
-
reduction
protected final WordReduction<C extends RingElem<C>> reduction
-
oneInGB
protected boolean oneInGB
-
putCount
protected int putCount
-
remCount
protected int remCount
-
-
Constructor Detail
-
OrderedWordPairlist
public OrderedWordPairlist()
Constructor.
-
OrderedWordPairlist
public OrderedWordPairlist(GenWordPolynomialRing<C> r)
Constructor.- Parameters:
r- word polynomial factory.
-
-
Method Detail
-
create
public WordPairList<C> create(GenWordPolynomialRing<C> r)
Create a new WordPairList.- Specified by:
createin interfaceWordPairList<C extends RingElem<C>>- Parameters:
r- word polynomial ring.
-
toString
public java.lang.String toString()
toString.- Specified by:
toStringin interfaceWordPairList<C extends RingElem<C>>- Overrides:
toStringin classjava.lang.Object
-
put
public int put(GenWordPolynomial<C> p)
Put one Polynomial to the pairlist and reduction matrix.- Specified by:
putin interfaceWordPairList<C extends RingElem<C>>- Parameters:
p- polynomial.- Returns:
- the index of the added polynomial.
-
put
public int put(java.util.List<GenWordPolynomial<C>> F)
Put all word polynomials in F to the pairlist and reduction matrix.- Specified by:
putin interfaceWordPairList<C extends RingElem<C>>- Parameters:
F- word polynomial list.- Returns:
- the index of the last added word polynomial.
-
removeNext
public WordPair<C> removeNext()
Remove the next required pair from the pairlist and reduction matrix. Appy the criterion 3 to see if the S-polynomial is required.- Specified by:
removeNextin 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:
hasNextin interfaceWordPairList<C extends RingElem<C>>- Returns:
- true if a next pair could exist, otherwise false.
-
getList
public java.util.List<GenWordPolynomial<C>> getList()
Get the list of polynomials.- Specified by:
getListin interfaceWordPairList<C extends RingElem<C>>- Returns:
- the polynomial list.
-
putCount
public int putCount()
Get the number of polynomials put to the pairlist.- Specified by:
putCountin 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:
remCountin interfaceWordPairList<C extends RingElem<C>>- Returns:
- the number of non null pairs delivered.
-
putOne
public int putOne(GenWordPolynomial<C> one)
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:
putOnein interfaceWordPairList<C extends RingElem<C>>- Returns:
- the index of the last polynomial.
-
criterion3
public boolean criterion3(int i, int j, Word eij)
GB criterium 3.- Returns:
- true if the S-polynomial(i,j) is required.
-
-