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:
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.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description AlgebraicNumberRing<C>afacAlgebraic field extension over C.java.util.List<GenPolynomial<AlgebraicNumber<C>>>afactorsList of factors with coefficients from AlgebraicNumberRing<C>.GenPolynomial<AlgebraicNumber<C>>apolyOriginal polynomial to be factored with coefficients from AlgebraicNumberRing<C>.java.util.List<Factors<AlgebraicNumber<C>>>arfactorsList of factors with coefficients from AlgebraicNumberRing<AlgebraicNumber<C>>.GenPolynomial<C>polyOriginal (irreducible) polynomial to be factored with coefficients from C.
-
Constructor Summary
Constructors Constructor Description Factors(GenPolynomial<C> p)Constructor.Factors(GenPolynomial<C> p, AlgebraicNumberRing<C> af, GenPolynomial<AlgebraicNumber<C>> ap, java.util.List<GenPolynomial<AlgebraicNumber<C>>> afact)Constructor.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Factors<C> facs)Comparison.booleanequals(java.lang.Object B)Comparison with any other object.AlgebraicNumberRing<C>findExtensionField()Find largest extension field.Factors<AlgebraicNumber<C>>getFactor(GenPolynomial<AlgebraicNumber<C>> p)Get the factor for polynomial.java.util.List<GenPolynomial<AlgebraicNumber<C>>>getFactors()Get the list of factors at one level.inthashCode()Hash code for this Factors.intlength()Length.java.lang.StringtoScript()Get a scripting compatible string representation.java.lang.StringtoString()Get the String representation.
-
-
-
Field Detail
-
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 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)
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.
-
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:
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()
-
length
public int length()
Length. Number of factors.- Returns:
- number of factors.
-
hashCode
public int hashCode()
Hash code for this Factors.- 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(Factors<C> facs)
Comparison.- Specified by:
compareToin interfacejava.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
-
getFactor
public Factors<AlgebraicNumber<C>> getFactor(GenPolynomial<AlgebraicNumber<C>> p)
Get the factor for polynomial.- Returns:
- algebraic factor
-
-