Package edu.jas.ufd
Interface GreatestCommonDivisor<C extends GcdRingElem<C>>
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
GCDProxy
,GreatestCommonDivisorAbstract
,GreatestCommonDivisorFake
,GreatestCommonDivisorHensel
,GreatestCommonDivisorModEval
,GreatestCommonDivisorModular
,GreatestCommonDivisorPrimitive
,GreatestCommonDivisorSimple
,GreatestCommonDivisorSubres
Greatest common divisor algorithm interface.
Usage: To create classes that implement this interface use the GreatestCommonDivisorFactory. It will select an appropriate implementation based on the types of polynomial coefficients CT.
GreatestCommonDivisor<CT> engine = GCDFactory.<CT> getImplementation(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 = GCDFactory.getImplementation(cofac); c = engine.gcd(a, b);
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncontent
(GenPolynomial<C> P) GenPolynomial content.coPrime
(List<GenPolynomial<C>> A) GenPolynomial co-prime list.gcd
(GenPolynomial<C> P, GenPolynomial<C> S) GenPolynomial greatest common divisor.boolean
isCoPrime
(List<GenPolynomial<C>> A) GenPolynomial test for co-prime list.lcm
(GenPolynomial<C> P, GenPolynomial<C> S) GenPolynomial least common multiple.GenPolynomial primitive part.resultant
(GenPolynomial<C> P, GenPolynomial<C> S) GenPolynomial resultant.
-
Method Details
-
content
GenPolynomial content.- Parameters:
P
- GenPolynomial.- Returns:
- cont(P).
-
primitivePart
GenPolynomial primitive part.- Parameters:
P
- GenPolynomial.- Returns:
- pp(P).
-
gcd
GenPolynomial greatest common divisor.- Parameters:
P
- GenPolynomial.S
- GenPolynomial.- Returns:
- gcd(P,S).
-
lcm
GenPolynomial least common multiple.- Parameters:
P
- GenPolynomial.S
- GenPolynomial.- Returns:
- lcm(P,S).
-
resultant
GenPolynomial resultant. The input polynomials are considered as univariate polynomials in the main variable.- Parameters:
P
- GenPolynomial.S
- GenPolynomial.- Returns:
- res(P,S).
- Throws:
UnsupportedOperationException
- if there is no implementation in the sub-class.
-
coPrime
GenPolynomial co-prime list.- Parameters:
A
- list of GenPolynomials.- Returns:
- B with gcd(b,c) = 1 for all b != c in B and for all non-constant a in A there exists b in B with b|a. B does not contain zero or constant polynomials.
-
isCoPrime
GenPolynomial test for co-prime list.- Parameters:
A
- list of GenPolynomials.- Returns:
- true if gcd(b,c) = 1 for all b != c in B, else false.
-