Package edu.jas.application
Class CPair<C extends RingElem<C>>
- java.lang.Object
-
- edu.jas.application.CPair<C>
-
- Type Parameters:
C- coefficient type
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<CPair<C>>
public class CPair<C extends RingElem<C>> extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<CPair<C>>
Serializable subclass to hold pairs of colored polynomials.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description intiintjprotected intnColorPolynomial<C>piColorPolynomial<C>pjprotected booleantoZeroprotected booleanuseCriterion3protected booleanuseCriterion4
-
Constructor Summary
Constructors Constructor Description CPair(ColorPolynomial<C> a, ColorPolynomial<C> b, int i, int j)Pair constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(CPair<C> p)compareTo used in TreeMap.booleanequals(java.lang.Object ob)equals.intgetPairNumber()Get removed pair number.booleangetUseCriterion3()Get useCriterion3.booleangetUseCriterion4()Get useCriterion4.inthashCode()Hash code for this pair.booleanisZero()Is reduced to zero.voidpairNumber(int n)Set removed pair number.voidsetUseCriterion3(boolean c)Set useCriterion3.voidsetUseCriterion4(boolean c)Set useCriterion4.voidsetZero()Set zero reduction.java.lang.StringtoString()toString.
-
-
-
Field Detail
-
pi
public final ColorPolynomial<C extends RingElem<C>> pi
-
pj
public final ColorPolynomial<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
-
CPair
public CPair(ColorPolynomial<C> a, ColorPolynomial<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:
toStringin classjava.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:
equalsin classjava.lang.Object- Parameters:
ob- an Object.- Returns:
- true if this is equal to ob, else false.
-
compareTo
public int compareTo(CPair<C> p)
compareTo used in TreeMap. Comparison is based on the number of the pairs.
-
hashCode
public int hashCode()
Hash code for this pair.- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
setUseCriterion4
public void setUseCriterion4(boolean c)
Set useCriterion4.- Parameters:
c- boolean value to set.
-
getUseCriterion4
public boolean getUseCriterion4()
Get useCriterion4.- Returns:
- boolean value.
-
setUseCriterion3
public void setUseCriterion3(boolean c)
Set useCriterion3.- Parameters:
c- boolean value to set.
-
getUseCriterion3
public boolean getUseCriterion3()
Get useCriterion3.- Returns:
- boolean value.
-
-