edu.jas.gb
Class Pair<C extends RingElem<C>>
- java.lang.Object
-
- edu.jas.gb.AbstractPair<C>
-
- edu.jas.gb.Pair<C>
-
- Type Parameters:
C- coefficient type
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<Pair>
public class Pair<C extends RingElem<C>> extends AbstractPair<C> implements java.lang.Comparable<Pair>
Serializable subclass to hold pairs of polynomials.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Pair(ExpVector lcm, GenPolynomial<C> a, GenPolynomial<C> b, int i, int j)Pair constructor.Pair(ExpVector lcm, GenPolynomial<C> a, GenPolynomial<C> b, int i, int j, int s)Pair constructor.Pair(GenPolynomial<C> a, GenPolynomial<C> b, int i, int j)Pair constructor.Pair(GenPolynomial<C> a, GenPolynomial<C> b, int i, int j, int s)Pair constructor.Pair(java.lang.Object a, GenPolynomial<C> b, int i, int j)Deprecated.obsolete since Java 1.5
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareTo(Pair p)compareTo used in TreeMap // not used at moment.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.-
Methods inherited from class edu.jas.gb.AbstractPair
maxIndex
-
-
-
-
Constructor Detail
-
Pair
@Deprecated public Pair(java.lang.Object a, GenPolynomial<C> b, int i, int j)Deprecated. obsolete since Java 1.5Pair 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.
-
Pair
public Pair(GenPolynomial<C> a, GenPolynomial<C> b, int i, int j, int s)
Pair constructor.- Parameters:
a- polynomial i.b- polynomial j.i- first index.j- second index.s- maximal index.
-
Pair
public Pair(ExpVector lcm, GenPolynomial<C> a, GenPolynomial<C> b, int i, int j)
Pair constructor.- Parameters:
lcm- of lt(a) lt(b).a- polynomial i.b- polynomial j.i- first index.j- second index.
-
Pair
public Pair(ExpVector lcm, GenPolynomial<C> a, GenPolynomial<C> b, int i, int j, int s)
Pair constructor.- Parameters:
lcm- of lt(a) lt(b).a- polynomial i.b- polynomial j.i- first index.j- second index.s- maximal index.
-
-
Method Detail
-
toString
public java.lang.String toString()
toString.- Overrides:
toStringin classAbstractPair<C extends RingElem<C>>
-
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 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:
compareToin interfacejava.lang.Comparable<Pair>- Parameters:
p- a Pair.- Returns:
- 1 if (this < o), 0 if (this == o), -1 if (this > o).
-
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG