Package edu.jas.fd

Class GCDcoFactors<C extends GcdRingElem<C>>

  • Type Parameters:
    C - coefficient type
    All Implemented Interfaces:
    java.io.Serializable

    public class GCDcoFactors<C extends GcdRingElem<C>>
    extends java.lang.Object
    implements java.io.Serializable
    Container for the co-factors of left-right GCD computation. Invariant is left * coA * right = polyA and left * coB * right = polyB.
    See Also:
    Serialized Form
    • Method Detail

      • isGCD

        public boolean isGCD()
        Test if the invariants of this are fulfilled.
        Returns:
        true if x * (left * coA * right) = y * (polyA), for x, y with x * lc(left * coA * right) == y * lc(polyA) and x * (left * coB * right) == y * (polyB), for x, y with x * lc(left * coB * right) == y * lc(polyB).
      • toString

        public java.lang.String toString()
        Get the String representation.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • toScript

        public java.lang.String toScript()
        Get a scripting compatible string representation.
        Returns:
        script compatible representation for this container.
        See Also:
        ElemFactory.toScript()
      • hashCode

        public int hashCode()
        Hash code for this GCDcoFactors.
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object B)
        Comparison with any other object.
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • compareTo

        public int compareTo​(GCDcoFactors<C> facs)
        Comparison.
        Parameters:
        facs - gcd co-factors container.
        Returns:
        sign(this.polyA-facs.polyA) lexicographic > sign(this.polyB-facs.polyB) lexicographic > sign(this.coA-facs.coA) lexicographic > sign(this.coB-facs.coB) lexicographic > sign(this.left-facs.left) lexicographic > sign(this.right-facs.right).