Package edu.jas.ps

Class Pair<C extends RingElem<C>>

java.lang.Object
edu.jas.ps.Pair<C>
Type Parameters:
C - coefficient type
All Implemented Interfaces:
Serializable, Comparable<Pair>

public class Pair<C extends RingElem<C>> extends Object implements Serializable, Comparable<Pair>
Serializable subclass to hold pairs of power series.
See Also:
  • Field Details

    • pi

      public final MultiVarPowerSeries<C extends RingElem<C>> pi
    • pj

      public final MultiVarPowerSeries<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 Details

  • Method Details

    • toString

      public String toString()
      toString.
      Overrides:
      toString in class 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-power-series of this Pair was reduced to zero.
    • isZero

      public boolean isZero()
      Is reduced to zero.
      Returns:
      true if the S-power-series of this Pair was reduced to zero, else false.
    • equals

      public boolean equals(Object ob)
      equals.
      Overrides:
      equals in class 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 Comparable<C extends RingElem<C>>
      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:
      hashCode in class Object
      See Also:
    • 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.