edu.jas.ring
Class OrderedPairlist<C extends RingElem<C>>

java.lang.Object
  extended by edu.jas.ring.OrderedPairlist<C>
Direct Known Subclasses:
OrderedDPairlist

public class OrderedPairlist<C extends RingElem<C>>
extends java.lang.Object

Pair list management. Implemented using GenPolynomial, TreeMap and BitSet.

Author:
Heinz Kredel

Field Summary
protected  int moduleVars
           
protected  boolean oneInGB
           
protected  java.util.ArrayList<GenPolynomial<C>> P
           
protected  java.util.TreeMap<ExpVector,java.util.LinkedList<Pair<C>>> pairlist
           
protected  int putCount
           
protected  java.util.ArrayList<java.util.BitSet> red
           
protected  Reduction<C> reduction
           
protected  int remCount
           
protected  GenPolynomialRing<C> ring
           
protected  boolean useCriterion4
           
 
Constructor Summary
OrderedPairlist(GenPolynomialRing<C> r)
          Constructor for OrderedPairlist.
OrderedPairlist(int m, GenPolynomialRing<C> r)
          Constructor for OrderedPairlist.
 
Method Summary
 boolean criterion3(int i, int j, ExpVector eij)
          GB criterium 3.
 java.util.ArrayList<GenPolynomial<C>> getList()
          Get the list of polynomials.
 boolean hasNext()
          Test if there is possibly a pair in the list.
 int put(GenPolynomial<C> p)
          Put one Polynomial to the pairlist and reduction matrix.
 int putCount()
          Get the number of polynomials put to the pairlist.
 int putOne(GenPolynomial<C> one)
          Put to ONE-Polynomial to the pairlist.
 int remCount()
          Get the number of required pairs removed from the pairlist.
 Pair<C> removeNext()
          Remove the next required pair from the pairlist and reduction matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

P

protected final java.util.ArrayList<GenPolynomial<C extends RingElem<C>>> P

pairlist

protected final java.util.TreeMap<ExpVector,java.util.LinkedList<Pair<C extends RingElem<C>>>> pairlist

red

protected final java.util.ArrayList<java.util.BitSet> red

ring

protected final GenPolynomialRing<C extends RingElem<C>> ring

reduction

protected final Reduction<C extends RingElem<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

OrderedPairlist

public OrderedPairlist(GenPolynomialRing<C> r)
Constructor for OrderedPairlist.

Parameters:
r - polynomial factory.

OrderedPairlist

public OrderedPairlist(int m,
                       GenPolynomialRing<C> r)
Constructor for OrderedPairlist.

Parameters:
m - number of module variables.
r - polynomial factory.
Method Detail

put

public int put(GenPolynomial<C> p)
Put one Polynomial to the pairlist and reduction matrix.

Parameters:
p - polynomial.
Returns:
the index of the added polynomial.

removeNext

public Pair<C> removeNext()
Remove the next required pair from the pairlist and reduction matrix. Appy 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.ArrayList<GenPolynomial<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(GenPolynomial<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.