Package edu.jas.ufd

Class SquarefreeFactory


  • public class SquarefreeFactory
    extends java.lang.Object
    Squarefree factorization algorithms factory. Select appropriate squarefree factorization engine based on the coefficient types.

    Usage: To create objects that implement the Squarefree interface use the SquarefreeFactory. It will select an appropriate implementation based on the types of polynomial coefficients C. To obtain an implementation use getImplementation(), it returns an object of a class which extends the SquarefreeAbstract class which implements the Squarefree interface.

     Squarefree<CT> engine;
     engine = SquarefreeFactory.<CT> getImplementation(cofac);
     c = engine.squarefreeFactors(a);
     
    For example, if the coefficient type is BigInteger, the usage looks like
     BigInteger cofac = new BigInteger();
     Squarefree<BigInteger> engine;
     engine = SquarefreeFactory.getImplementation(cofac);
     Sm = engine.sqaurefreeFactors(poly);
     
    Author:
    Heinz Kredel
    See Also:
    Squarefree.squarefreeFactors(edu.jas.poly.GenPolynomial P)
    • Constructor Detail

    • Method Detail

      • getImplementation

        public static SquarefreeAbstract<ModLonggetImplementation​(ModLongRing fac)
        Determine suitable implementation of factorization algorithm, case ModLong.
        Parameters:
        fac - ModLongRing.
        Returns:
        squarefree factorization algorithm implementation.
      • getImplementation

        public static SquarefreeAbstract<ModIntgetImplementation​(ModIntRing fac)
        Determine suitable implementation of factorization algorithm, case ModInt.
        Parameters:
        fac - ModIntRing.
        Returns:
        squarefree factorization algorithm implementation.
      • getImplementation

        public static SquarefreeAbstract<BigIntegergetImplementation​(BigInteger fac)
        Determine suitable implementation of squarefree factorization algorithm, case BigInteger.
        Parameters:
        fac - BigInteger.
        Returns:
        squarefree factorization algorithm implementation.
      • getImplementation

        public static SquarefreeAbstract<BigRationalgetImplementation​(BigRational fac)
        Determine suitable implementation of squarefree factorization algorithms, case BigRational.
        Parameters:
        fac - BigRational.
        Returns:
        squarefree factorization algorithm implementation.
      • getImplementation

        public static <C extends GcdRingElem<C>> SquarefreeAbstract<AlgebraicNumber<C>> getImplementation​(AlgebraicNumberRing<C> fac)
        Determine suitable implementation of squarefree factorization algorithms, case AlgebraicNumber<C>.
        Type Parameters:
        C - coefficient type, e.g. BigRational, ModInteger.
        Parameters:
        fac - AlgebraicNumberRing<C>.
        Returns:
        squarefree factorization algorithm implementation.
      • getImplementation

        public static <C extends GcdRingElem<C>> SquarefreeAbstract<Quotient<C>> getImplementation​(QuotientRing<C> fac)
        Determine suitable implementation of squarefree factorization algorithms, case Quotient<C>.
        Type Parameters:
        C - coefficient type, e.g. BigRational, ModInteger.
        Parameters:
        fac - QuotientRing<C>.
        Returns:
        squarefree factorization algorithm implementation.
      • getImplementation

        public static <C extends GcdRingElem<C>> SquarefreeAbstract<C> getImplementation​(GenPolynomialRing<C> fac)
        Determine suitable implementation of squarefree factorization algorithms, case GenPolynomial<C>.
        Type Parameters:
        C - coefficient type, e.g. BigRational, ModInteger.
        Parameters:
        fac - GenPolynomialRing<C>.
        Returns:
        squarefree factorization algorithm implementation.
      • getImplementation

        public static <C extends GcdRingElem<C>> SquarefreeAbstract<C> getImplementation​(RingFactory<C> fac)
        Determine suitable implementation of squarefree factorization algorithms, other cases.
        Type Parameters:
        C - coefficient type
        Parameters:
        fac - RingFactory<C>.
        Returns:
        squarefree factorization algorithm implementation.