Package edu.jas.ufd
Class SquarefreeFactory
- java.lang.Object
-
- edu.jas.ufd.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
Squarefreeinterface use theSquarefreeFactory. It will select an appropriate implementation based on the types of polynomial coefficients C. To obtain an implementation usegetImplementation(), it returns an object of a class which extends theSquarefreeAbstractclass which implements theSquarefreeinterface.Squarefree<CT> engine; engine = SquarefreeFactory.<CT> getImplementation(cofac); c = engine.squarefreeFactors(a);
For example, if the coefficient type is BigInteger, the usage looks likeBigInteger 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 Summary
Constructors Modifier Constructor Description protectedSquarefreeFactory()Protected factory constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SquarefreeAbstract<BigInteger>getImplementation(BigInteger fac)Determine suitable implementation of squarefree factorization algorithm, case BigInteger.static SquarefreeAbstract<BigRational>getImplementation(BigRational fac)Determine suitable implementation of squarefree factorization algorithms, case BigRational.static SquarefreeAbstract<ModInteger>getImplementation(ModIntegerRing fac)Determine suitable implementation of factorization algorithm, case ModInteger.static SquarefreeAbstract<ModInt>getImplementation(ModIntRing fac)Determine suitable implementation of factorization algorithm, case ModInt.static SquarefreeAbstract<ModLong>getImplementation(ModLongRing fac)Determine suitable implementation of factorization algorithm, case ModLong.static <C extends GcdRingElem<C>>
SquarefreeAbstract<AlgebraicNumber<C>>getImplementation(AlgebraicNumberRing<C> fac)Determine suitable implementation of squarefree factorization algorithms, case AlgebraicNumber<C>.static <C extends GcdRingElem<C>>
SquarefreeAbstract<C>getImplementation(GenPolynomialRing<C> fac)Determine suitable implementation of squarefree factorization algorithms, case GenPolynomial<C>.static <C extends GcdRingElem<C>>
SquarefreeAbstract<C>getImplementation(RingFactory<C> fac)Determine suitable implementation of squarefree factorization algorithms, other cases.static <C extends GcdRingElem<C>>
SquarefreeAbstract<Quotient<C>>getImplementation(QuotientRing<C> fac)Determine suitable implementation of squarefree factorization algorithms, case Quotient<C>.protected static <C extends GcdRingElem<C>>
SquarefreeAbstract<C>getImplementationPoly(GenPolynomialRing<C> fac)
-
-
-
Constructor Detail
-
SquarefreeFactory
protected SquarefreeFactory()
Protected factory constructor.
-
-
Method Detail
-
getImplementation
public static SquarefreeAbstract<ModInteger> getImplementation(ModIntegerRing fac)
Determine suitable implementation of factorization algorithm, case ModInteger.- Parameters:
fac- ModIntegerRing.- Returns:
- squarefree factorization algorithm implementation.
-
getImplementation
public static SquarefreeAbstract<ModLong> getImplementation(ModLongRing fac)
Determine suitable implementation of factorization algorithm, case ModLong.- Parameters:
fac- ModLongRing.- Returns:
- squarefree factorization algorithm implementation.
-
getImplementation
public static SquarefreeAbstract<ModInt> getImplementation(ModIntRing fac)
Determine suitable implementation of factorization algorithm, case ModInt.- Parameters:
fac- ModIntRing.- Returns:
- squarefree factorization algorithm implementation.
-
getImplementation
public static SquarefreeAbstract<BigInteger> getImplementation(BigInteger fac)
Determine suitable implementation of squarefree factorization algorithm, case BigInteger.- Parameters:
fac- BigInteger.- Returns:
- squarefree factorization algorithm implementation.
-
getImplementation
public static SquarefreeAbstract<BigRational> getImplementation(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.
-
getImplementationPoly
protected static <C extends GcdRingElem<C>> SquarefreeAbstract<C> getImplementationPoly(GenPolynomialRing<C> fac)
-
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.
-
-