edu.jas.ufd
Interface GreatestCommonDivisor<C extends GcdRingElem<C>>

All Known Implementing Classes:
GCDProxy, GreatestCommonDivisorAbstract, GreatestCommonDivisorModEval, GreatestCommonDivisorModular, GreatestCommonDivisorPrimitive, GreatestCommonDivisorSimple, GreatestCommonDivisorSubres

public interface GreatestCommonDivisor<C extends GcdRingElem<C>>

Greatest common divisor algorithm interface.

Author:
Heinz Kredel
See Also:
GCDFactory.getImplementation( edu.jas.structure.RingFactory f)
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.<BigInteger>getImplementation( cofac );
 c = engine.gcd(a,b);
 

Method Summary
 GenPolynomial<C> content(GenPolynomial<C> P)
          GenPolynomial content.
 GenPolynomial<C> gcd(GenPolynomial<C> P, GenPolynomial<C> S)
          GenPolynomial greatest comon divisor.
 GenPolynomial<C> lcm(GenPolynomial<C> P, GenPolynomial<C> S)
          GenPolynomial least comon multiple.
 GenPolynomial<C> primitivePart(GenPolynomial<C> P)
          GenPolynomial primitive part.
 GenPolynomial<C> resultant(GenPolynomial<C> P, GenPolynomial<C> S)
          GenPolynomial resultant.
 java.util.Map<java.lang.Integer,GenPolynomial<C>> squarefreeFactors(GenPolynomial<C> P)
          GenPolynomial squarefree factorization.
 GenPolynomial<C> squarefreePart(GenPolynomial<C> P)
          GenPolynomial greatest squarefree divisor.
 

Method Detail

content

GenPolynomial<C> content(GenPolynomial<C> P)
GenPolynomial content.

Parameters:
P - GenPolynomial.
Returns:
cont(P).

primitivePart

GenPolynomial<C> primitivePart(GenPolynomial<C> P)
GenPolynomial primitive part.

Parameters:
P - GenPolynomial.
Returns:
pp(P).

gcd

GenPolynomial<C> gcd(GenPolynomial<C> P,
                     GenPolynomial<C> S)
GenPolynomial greatest comon divisor.

Parameters:
P - GenPolynomial.
S - GenPolynomial.
Returns:
gcd(P,S).

lcm

GenPolynomial<C> lcm(GenPolynomial<C> P,
                     GenPolynomial<C> S)
GenPolynomial least comon multiple.

Parameters:
P - GenPolynomial.
S - GenPolynomial.
Returns:
lcm(P,S).

resultant

GenPolynomial<C> resultant(GenPolynomial<C> P,
                           GenPolynomial<C> S)
GenPolynomial resultant.

Parameters:
P - GenPolynomial.
S - GenPolynomial.
Returns:
res(P,S).

squarefreePart

GenPolynomial<C> squarefreePart(GenPolynomial<C> P)
GenPolynomial greatest squarefree divisor.

Parameters:
P - GenPolynomial.
Returns:
squarefree(P).

squarefreeFactors

java.util.Map<java.lang.Integer,GenPolynomial<C>> squarefreeFactors(GenPolynomial<C> P)
GenPolynomial squarefree factorization.

Parameters:
P - GenPolynomial.
Returns:
squarefreeFactors(P).