Package edu.jas.gb
Class WordPair<C extends RingElem<C>>
java.lang.Object
edu.jas.gb.WordPair<C>
- Type Parameters:
C
- coefficient type
- All Implemented Interfaces:
Comparable<WordPair>
Serializable subclass to hold pairs of word polynomials.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal int
final int
protected int
final GenWordPolynomial
<C> final GenWordPolynomial
<C> -
Constructor Summary
ConstructorsConstructorDescriptionWordPair
(GenWordPolynomial<C> a, GenWordPolynomial<C> b, int i, int j) WordPair constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo used in TreeMap // not used at moment.boolean
equals.int
Get removed pair number.int
hashCode()
Hash code for this WordPair.void
pairNumber
(int n) Set removed pair number.toString()
toString.
-
Field Details
-
pi
-
pj
-
i
public final int i -
j
public final int j -
n
protected int n
-
-
Constructor Details
-
WordPair
WordPair constructor.- Parameters:
a
- word polynomial i.b
- word polynomial j.i
- first index.j
- second index.
-
-
Method Details
-
toString
toString. -
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.
-
equals
equals. -
compareTo
compareTo used in TreeMap // not used at moment. Comparison is based on the number of the pairs.- Specified by:
compareTo
in interfaceComparable<C extends RingElem<C>>
- Parameters:
p
- a WordPair.- Returns:
- 1 if (this < o), 0 if (this == o), -1 if (this > o).
-
hashCode
public int hashCode()Hash code for this WordPair.
-