Package edu.jas.fd
Class GCDcoFactors<C extends GcdRingElem<C>>
- java.lang.Object
-
- edu.jas.fd.GCDcoFactors<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.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description GenSolvablePolynomial<C>coACo-factor of A.GenSolvablePolynomial<C>coBCo-factor of B.GreatestCommonDivisorAbstract<C>fdGCD algorithm to use for verification.GenSolvablePolynomial<C>leftLeft GCD of A and B.GenSolvablePolynomial<C>polyAOriginal polynomial A of the GCD computation.GenSolvablePolynomial<C>polyBOriginal polynomial B of the GCD computation.GenSolvablePolynomial<C>rightRight GCD of A and B.
-
Constructor Summary
Constructors Constructor Description GCDcoFactors(GreatestCommonDivisorAbstract<C> g, GenSolvablePolynomial<C> a, GenSolvablePolynomial<C> b, GenSolvablePolynomial<C> ca, GenSolvablePolynomial<C> cb, GenSolvablePolynomial<C> l, GenSolvablePolynomial<C> r)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(GCDcoFactors<C> facs)Comparison.booleanequals(java.lang.Object B)Comparison with any other object.inthashCode()Hash code for this GCDcoFactors.booleanisGCD()Test if the invariants of this are fulfilled.java.lang.StringtoScript()Get a scripting compatible string representation.java.lang.StringtoString()Get the String representation.
-
-
-
Field Detail
-
fd
public final GreatestCommonDivisorAbstract<C extends GcdRingElem<C>> fd
GCD algorithm to use for verification.
-
polyA
public final GenSolvablePolynomial<C extends GcdRingElem<C>> polyA
Original polynomial A of the GCD computation.
-
polyB
public final GenSolvablePolynomial<C extends GcdRingElem<C>> polyB
Original polynomial B of the GCD computation.
-
coA
public final GenSolvablePolynomial<C extends GcdRingElem<C>> coA
Co-factor of A.
-
coB
public final GenSolvablePolynomial<C extends GcdRingElem<C>> coB
Co-factor of B.
-
left
public final GenSolvablePolynomial<C extends GcdRingElem<C>> left
Left GCD of A and B.
-
right
public final GenSolvablePolynomial<C extends GcdRingElem<C>> right
Right GCD of A and B.
-
-
Constructor Detail
-
GCDcoFactors
public GCDcoFactors(GreatestCommonDivisorAbstract<C> g, GenSolvablePolynomial<C> a, GenSolvablePolynomial<C> b, GenSolvablePolynomial<C> ca, GenSolvablePolynomial<C> cb, GenSolvablePolynomial<C> l, GenSolvablePolynomial<C> r)
Constructor.- Parameters:
g- GCD algorithm to use for verification.a- polynomial A.b- polynomial B.ca- polynomial coA.cb- polynomial coB.l- polynomial left GCD.r- polynomial right GCD.
-
-
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:
toStringin classjava.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:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object B)
Comparison with any other object.- Overrides:
equalsin classjava.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).
-
-