Package edu.jas.ufd

Class Factors<C extends GcdRingElem<C>>

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

public class Factors<C extends GcdRingElem<C>> extends Object implements Comparable<Factors<C>>, Serializable
Container for the factors of absolute factorization.
See Also:
  • Field Details

    • poly

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

      public final AlgebraicNumberRing<C extends GcdRingElem<C>> afac
      Algebraic field extension over C. Should be null, if p is absolutely irreducible.
    • 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 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 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 Details

  • Method Details

    • toString

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

      public String toScript()
      Get a scripting compatible string representation.
      Returns:
      script compatible representation for this container.
      See Also:
    • 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 Object
      See Also:
    • equals

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

      public int compareTo(Factors<C> facs)
      Comparison.
      Specified by:
      compareTo in interface 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 List<GenPolynomial<AlgebraicNumber<C>>> getFactors()
      Get the list of factors at one level.
      Returns:
      list of algebraic factors
    • getFactor

      Get the factor for polynomial.
      Returns:
      algebraic factor