Documentation of 'edu.jas.gb.WordPair' Java class
WordPair
edu.jas.gb

Class WordPair<C extends RingElem<C>>

  • Type Parameters:
    C - coefficient type
    All Implemented Interfaces:
    java.lang.Comparable<WordPair>


    public class WordPair<C extends RingElem<C>>
    extends java.lang.Object
    implements java.lang.Comparable<WordPair>
    Serializable subclass to hold pairs of word polynomials.
    • Constructor Detail

      • WordPair

        public WordPair(GenWordPolynomial<C> a,
                        GenWordPolynomial<C> b,
                        int i,
                        int j)
        WordPair constructor.
        Parameters:
        a - word polynomial i.
        b - word 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.
      • 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(WordPair 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<WordPair>
        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.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.