|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.ufd.GCDFactory
public class GCDFactory
Greatest common divisor algorithms factory. Select appropriate GCD engine based on the coefficient types.
GreatestCommonDivisor.gcd( edu.jas.poly.GenPolynomial P, edu.jas.poly.GenPolynomial S)
GreatestCommonDivisor<CT> engine; engine = GCDFactory.<CT>getImplementation( cofac ); or engine = GCDFactory.<CT>getProxy( cofac ); c = engine.gcd(a,b);For example, if the coefficient type is BigInteger, the usage looks like
BigInteger cofac = new BigInteger(); GreatestCommonDivisor<BigInteger> engine; engine = GCDFactory.<BigInteger>getImplementation( cofac ); or engine = GCDFactory.<BigInteger>getProxy( cofac ); c = engine.gcd(a,b);
Constructor Summary | |
---|---|
protected |
GCDFactory()
Protected factory constructor. |
Method Summary | ||
---|---|---|
static GreatestCommonDivisor<BigInteger> |
getImplementation(BigInteger fac)
Determine suitable implementation of gcd algorithms, case BigInteger. |
|
static GreatestCommonDivisor<BigRational> |
getImplementation(BigRational fac)
Determine suitable implementation of gcd algorithms, case BigRational. |
|
static GreatestCommonDivisor<ModInteger> |
getImplementation(ModIntegerRing fac)
Determine suitable implementation of gcd algorithms, case ModInteger. |
|
static
|
getImplementation(RingFactory<C> fac)
Determine suitable implementation of gcd algorithms, other cases. |
|
static GreatestCommonDivisor<BigInteger> |
getProxy(BigInteger fac)
Determine suitable procy for gcd algorithms, case BigInteger. |
|
static GreatestCommonDivisor<BigRational> |
getProxy(BigRational fac)
Determine suitable proxy for gcd algorithms, case BigRational. |
|
static GreatestCommonDivisor<ModInteger> |
getProxy(ModIntegerRing fac)
Determine suitable proxy for gcd algorithms, case ModInteger. |
|
static
|
getProxy(RingFactory<C> fac)
Determine suitable proxy for gcd algorithms, other cases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected GCDFactory()
Method Detail |
---|
public static GreatestCommonDivisor<ModInteger> getImplementation(ModIntegerRing fac)
fac
- ModInteger.
public static GreatestCommonDivisor<ModInteger> getProxy(ModIntegerRing fac)
fac
- ModInteger.
public static GreatestCommonDivisor<BigInteger> getImplementation(BigInteger fac)
fac
- BigInteger.
public static GreatestCommonDivisor<BigInteger> getProxy(BigInteger fac)
fac
- BigInteger.
public static GreatestCommonDivisor<BigRational> getImplementation(BigRational fac)
fac
- BigRational.
public static GreatestCommonDivisor<BigRational> getProxy(BigRational fac)
fac
- BigRational.
public static <C extends GcdRingElem<C>> GreatestCommonDivisor<C> getImplementation(RingFactory<C> fac)
fac
- RingFactorypublic static <C extends GcdRingElem<C>> GreatestCommonDivisor<C> getProxy(RingFactory<C> fac)
fac
- RingFactory
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |