/*
* $Id$
*/
package edu.jas.ufd;
import java.io.Serializable;
import java.util.List;
import java.util.SortedMap;
import edu.jas.poly.GenPolynomial;
import edu.jas.structure.GcdRingElem;
/**
* Factorization algorithms interface.
* @usage To create objects that implement the Factorization
* interface use the FactorFactory. 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 FactorAbstract class which implements
* the Factorization interface.
*
*
* Factorization<CT> engine;
* engine = FactorFactory.<CT> getImplementation(cofac);
* c = engine.factors(a);
*
*
* For example, if the coefficient type is BigInteger, the usage looks
* like
*
*
* BigInteger cofac = new BigInteger();
* Factorization<BigInteger> engine;
* engine = FactorFactory.getImplementation(cofac);
* Sm = engine.factors(poly);
*
*
* @see edu.jas.ufd.FactorFactory#getImplementation
* @author Heinz Kredel
* @param coefficient type
*/
public interface Factorization> extends Serializable {
/**
* GenPolynomial test if is irreducible.
* @param P GenPolynomial.
* @return true if P is irreducible, else false.
*/
public boolean isIrreducible(GenPolynomial P);
/**
* GenPolynomial test if a non trivial factorization exsists.
* @param P GenPolynomial.
* @return true if P is reducible, else false.
*/
public boolean isReducible(GenPolynomial P);
/**
* GenPolynomial test if is squarefree.
* @param P GenPolynomial.
* @return true if P is squarefree, else false.
*/
public boolean isSquarefree(GenPolynomial P);
/**
* GenPolynomial factorization of a squarefree polynomial.
* @param P squarefree and primitive! or monic! GenPolynomial.
* @return [p_1,...,p_k] with P = prod_{i=1,...,r} p_i.
*/
public List> factorsSquarefree(GenPolynomial P);
/**
* GenPolynomial factorization.
* @param P GenPolynomial.
* @return [p_1 -> e_1, ..., p_k -> e_k] with P = prod_{i=1,...,k} p_i**e_i.
*/
public SortedMap, Long> factors(GenPolynomial P);
/**
* GenPolynomial factorization ignoring multiplicities.
* @param P GenPolynomial.
* @return [p_1, ..., p_k] with P = prod_{i=1,...,k} p_i**{e_i} for some e_i.
*/
public List> factorsRadical(GenPolynomial P);
/**
* GenPolynomial greatest squarefree divisor.
* @param P GenPolynomial.
* @return squarefree(P).
*/
public GenPolynomial squarefreePart(GenPolynomial P);
/**
* GenPolynomial squarefree factorization.
* @param P GenPolynomial.
* @return [p_1 -> e_1, ..., p_k -> e_k] with P = prod_{i=1,...,k} p_i^{e_i}
* and p_i squarefree.
*/
public SortedMap, Long> squarefreeFactors(GenPolynomial P);
/**
* GenPolynomial is factorization.
* @param P GenPolynomial
* @param F = [p_1,...,p_k].
* @return true if P = prod_{i=1,...,r} p_i, else false.
*/
public boolean isFactorization(GenPolynomial P, List> F);
/**
* GenPolynomial is factorization.
* @param P GenPolynomial.
* @param F = [p_1 -> e_1, ..., p_k -> e_k].
* @return true if P = prod_{i=1,...,k} p_i**e_i , else false.
*/
public boolean isFactorization(GenPolynomial P, SortedMap, Long> F);
}
Ads help maintain this website.