edu.jas.ufd
Class Factors<C extends GcdRingElem<C>>

java.lang.Object
  extended by 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
 AlgebraicNumberRing<C> afac
          Algebraic field extension over C.
 java.util.List<GenPolynomial<AlgebraicNumber<C>>> afactors
          List of factors with coefficients from AlgebraicNumberRing<C>.
 GenPolynomial<AlgebraicNumber<C>> apoly
          Original polynomial to be factored with coefficients from AlgebraicNumberRing<C>.
 java.util.List<Factors<AlgebraicNumber<C>>> arfactors
          List of factors with coefficients from AlgebraicNumberRing<AlgebraicNumber<C>>.
 GenPolynomial<C> poly
          Original (irreducible) polynomial to be factored with coefficients from C.
 
Constructor Summary
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
 int compareTo(Factors<C> facs)
          Comparison.
 boolean equals(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.
 int hashCode()
          Hash code for this Factors.
 java.lang.String toScript()
          Get a scripting compatible string representation.
 java.lang.String toString()
          Get the String representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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:
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 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<Factors<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