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

java.lang.Object
  extended by edu.jas.ring.Pair<C>
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Pair>

public class Pair<C extends RingElem<C>>
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable<Pair>

Serializable subclass to hold pairs of polynomials.

Author:
Heinz Kredel.
See Also:
Serialized Form
Type parameter:
C coefficient factory.

Field Summary
 int i
           
 int j
           
protected  int n
           
 GenPolynomial<C> pi
           
 GenPolynomial<C> pj
           
protected  boolean toZero
           
protected  boolean useCriterion3
           
protected  boolean useCriterion4
           
 
Constructor Summary
Pair(GenPolynomial<C> a, GenPolynomial<C> b, int i, int j)
          Pair constructor.
Pair(java.lang.Object a, GenPolynomial<C> b, int i, int j)
          Pair constructor.
 
Method Summary
 int compareTo(Pair p)
          compareTo used in TreeMap // not used at moment.
 boolean equals(java.lang.Object ob)
          equals.
 int getPairNumber()
          Get removed pair number.
 boolean getUseCriterion3()
          Get useCriterion3.
 boolean getUseCriterion4()
          Get useCriterion4.
 boolean isZero()
          Is reduced to zero.
 void pairNumber(int n)
          Set removed pair number.
 void setUseCriterion3(boolean c)
          Set useCriterion3.
 void setUseCriterion4(boolean c)
          Set useCriterion4.
 void setZero()
          Set zero reduction.
 edu.jas.ring.MiniPair toMiniPair()
          what is this for?
 java.lang.String toString()
          toString.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pi

public final GenPolynomial<C extends RingElem<C>> pi

pj

public final GenPolynomial<C extends RingElem<C>> pj

i

public final int i

j

public final int j

n

protected int n

toZero

protected boolean toZero

useCriterion4

protected boolean useCriterion4

useCriterion3

protected boolean useCriterion3
Constructor Detail

Pair

public Pair(java.lang.Object a,
            GenPolynomial<C> b,
            int i,
            int j)
Pair constructor.

Parameters:
a - polynomial i (must be castable to GenPolynomial<C>).
b - polynomial j.
i - first index.
j - second index.

Pair

public Pair(GenPolynomial<C> a,
            GenPolynomial<C> b,
            int i,
            int j)
Pair constructor.

Parameters:
a - polynomial i.
b - polynomial j.
i - first index.
j - second index.
Method Detail

toString

public java.lang.String toString()
toString.

Overrides:
toString in class java.lang.Object

pairNumber

public void pairNumber(int n)
Set removed pair number.

Parameters:
n - number of this pair generated in OrderedPairlist.

getPairNumber

public int getPairNumber()
Get removed pair number.

Returns:
n number of this pair generated in OrderedPairlist.

setZero

public void setZero()
Set zero reduction. The S-polynomial of this Pair was reduced to zero.


isZero

public boolean isZero()
Is reduced to zero.

Returns:
true if the S-polynomial of this Pair was reduced to zero, else false.

equals

public boolean equals(java.lang.Object ob)
equals.

Overrides:
equals in class java.lang.Object
Parameters:
ob - an Object.
Returns:
true if this is equal to o, else false.

compareTo

public int compareTo(Pair p)
compareTo used in TreeMap // not used at moment. Comparison is based on the number of the pairs.

Specified by:
compareTo in interface java.lang.Comparable<Pair>
Parameters:
p - a Pair.
Returns:
1 if (this < o), 0 if (this == o), -1 if (this > o).

setUseCriterion4

public void setUseCriterion4(boolean c)
Set useCriterion4.

Parameters:
b - boolean value to set.

getUseCriterion4

public boolean getUseCriterion4()
Get useCriterion4.

Returns:
boolean value.

setUseCriterion3

public void setUseCriterion3(boolean c)
Set useCriterion3.

Parameters:
b - boolean value to set.

getUseCriterion3

public boolean getUseCriterion3()
Get useCriterion3.

Returns:
boolean value.

toMiniPair

public edu.jas.ring.MiniPair toMiniPair()
what is this for?