Package edu.jas.ufd

Class Factors<C extends GcdRingElem<C>>

  • Type Parameters:
    C - coefficient type
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Factors<C>>

    public class Factors<C extends GcdRingElem<C>>
    extends java.lang.Object
    implements java.lang.Comparable<Factors<C>>, java.io.Serializable
    Container for the factors of absolute factorization.
    See Also:
    Serialized Form
    • Field Detail

      • poly

        public final GenPolynomial<C extends GcdRingElem<C>> poly
        Original (irreducible) polynomial to be factored with coefficients from C.
      • apoly

        public final GenPolynomial<AlgebraicNumber<C extends GcdRingElem<C>>> apoly
        Original polynomial to be factored with coefficients from AlgebraicNumberRing<C>. Should be null, if p is absolutely irreducible.
      • afactors

        public final java.util.List<GenPolynomial<AlgebraicNumber<C extends GcdRingElem<C>>>> afactors
        List of factors with coefficients from AlgebraicNumberRing<C>. Should be null, if p is absolutely irreducible.
      • arfactors

        public final java.util.List<Factors<AlgebraicNumber<C extends GcdRingElem<C>>>> arfactors
        List of factors with coefficients from AlgebraicNumberRing<AlgebraicNumber<C>>. Should be null, if p is absolutely irreducible.
    • Constructor Detail

      • Factors

        public Factors​(GenPolynomial<C> p)
        Constructor.
        Parameters:
        p - absolute irreducible GenPolynomial.
      • Factors

        public Factors​(GenPolynomial<C> p,
                       AlgebraicNumberRing<C> af,
                       GenPolynomial<AlgebraicNumber<C>> ap,
                       java.util.List<GenPolynomial<AlgebraicNumber<C>>> afact,
                       java.util.List<Factors<AlgebraicNumber<C>>> arfact)
        Constructor.
        Parameters:
        p - irreducible GenPolynomial over C.
        af - algebraic extension field of C where p has factors from afact.
        ap - GenPolynomial p represented with coefficients from af.
        afact - absolute irreducible factors of p with coefficients from af.
        arfact - further absolute irreducible factors of p with coefficients from extensions of af.
    • Method Detail

      • 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()
      • length

        public int length()
        Length. Number of factors.
        Returns:
        number of factors.
      • hashCode

        public int hashCode()
        Hash code for this Factors.
        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​(Factors<C> facs)
        Comparison.
        Specified by:
        compareTo in interface java.lang.Comparable<C extends GcdRingElem<C>>
        Parameters:
        facs - factors container.
        Returns:
        sign(this.poly-facs.poly) lexicographic > sign(afac.modul-facs.afac.modul) lexicographic > afactors.compareTo(facs.afactors) lexicographic > arfactors[i].compareTo(facs.arfactors[i])
      • findExtensionField

        public AlgebraicNumberRing<C> findExtensionField()
        Find largest extension field.
        Returns:
        largest extension field or null if no extension field
      • getFactors

        public java.util.List<GenPolynomial<AlgebraicNumber<C>>> getFactors()
        Get the list of factors at one level.
        Returns:
        list of algebraic factors