Package edu.jas.ufd
Class SquarefreeAbstract<C extends GcdRingElem<C>>
java.lang.Object
edu.jas.ufd.SquarefreeAbstract<C>
- All Implemented Interfaces:
Squarefree<C>
,Serializable
- Direct Known Subclasses:
SquarefreeFieldChar0
,SquarefreeFieldCharP
,SquarefreeRingChar0
public abstract class SquarefreeAbstract<C extends GcdRingElem<C>>
extends Object
implements Squarefree<C>
Abstract squarefree decomposition class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final GreatestCommonDivisorAbstract
<C> GCD engine for respective base coefficients.private static final org.apache.logging.log4j.Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList
<List<GenPolynomial<C>>> basePartialFraction
(GenPolynomial<C> A, SortedMap<GenPolynomial<C>, Long> D) Univariate GenPolynomial partial fraction decomposition.abstract SortedMap
<GenPolynomial<C>, Long> GenPolynomial polynomial squarefree factorization.abstract GenPolynomial
<C> GenPolynomial polynomial greatest squarefree divisor.coPrimeSquarefree
(GenPolynomial<C> a, List<GenPolynomial<C>> P) GenPolynomial squarefree and co-prime list.GenPolynomial squarefree and co-prime list.long
Count number of factors in a (squarefree) factorization.boolean
isBasePartialFraction
(GenPolynomial<C> A, SortedMap<GenPolynomial<C>, Long> D, List<List<GenPolynomial<C>>> F) Test for Univariate GenPolynomial partial fraction decomposition.boolean
Test if list of GenPolynomials is squarefree and co-prime.boolean
isFactorization
(GenPolynomial<C> P, List<GenPolynomial<C>> F) GenPolynomial is (squarefree) factorization.boolean
isFactorization
(GenPolynomial<C> P, SortedMap<GenPolynomial<C>, Long> F) GenPolynomial is (squarefree) factorization.boolean
isRecursiveFactorization
(GenPolynomial<GenPolynomial<C>> P, SortedMap<GenPolynomial<GenPolynomial<C>>, Long> F) GenPolynomial is (squarefree) factorization.boolean
Recursive GenPolynomial test if is squarefree.boolean
GenPolynomial test if is squarefree.boolean
isSquarefree
(List<GenPolynomial<C>> L) GenPolynomial list test if squarefree.(package private) boolean
Normalize factorization.GenPolynomial recursive polynomial squarefree factorization.GenPolynomial recursive polynomial greatest squarefree divisor.abstract SortedMap
<GenPolynomial<GenPolynomial<C>>, Long> GenPolynomial recursive univariate polynomial squarefree factorization.abstract GenPolynomial
<GenPolynomial<C>> GenPolynomial recursive polynomial greatest squarefree divisor.Coefficients squarefree factorization.abstract SortedMap
<GenPolynomial<C>, Long> GenPolynomial squarefree factorization.squarefreePart
(C P) Coefficients greatest squarefree divisor.abstract GenPolynomial
<C> GenPolynomial greatest squarefree divisor.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
engine
GCD engine for respective base coefficients.
-
-
Constructor Details
-
SquarefreeAbstract
Constructor.
-
-
Method Details
-
baseSquarefreePart
GenPolynomial polynomial greatest squarefree divisor.- Parameters:
P
- GenPolynomial.- Returns:
- squarefree(pp(P)).
-
baseSquarefreeFactors
GenPolynomial polynomial squarefree factorization.- Parameters:
A
- GenPolynomial.- Returns:
- [p_1 -> e_1, ..., p_k -> e_k] with A = prod_{i=1,...,k} p_i^{e_i} and p_i squarefree and gcd(p_i, p_j) = 1, for i != j.
-
recursiveUnivariateSquarefreePart
public abstract GenPolynomial<GenPolynomial<C>> recursiveUnivariateSquarefreePart(GenPolynomial<GenPolynomial<C>> P) GenPolynomial recursive polynomial greatest squarefree divisor.- Parameters:
P
- recursive univariate GenPolynomial.- Returns:
- squarefree(pp(P)).
-
recursiveUnivariateSquarefreeFactors
public abstract SortedMap<GenPolynomial<GenPolynomial<C>>,Long> recursiveUnivariateSquarefreeFactors(GenPolynomial<GenPolynomial<C>> P) GenPolynomial recursive univariate polynomial squarefree factorization.- Parameters:
P
- recursive univariate GenPolynomial.- Returns:
- [p_1 -> e_1, ..., p_k -> e_k] with P = prod_{i=1,...,k} p_i^{e_i} and p_i squarefree and gcd(p_i, p_j) = 1, for i != j.
-
squarefreePart
GenPolynomial greatest squarefree divisor.- Specified by:
squarefreePart
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
P
- GenPolynomial.- Returns:
- squarefree(P) a primitive respectively monic polynomial.
-
isSquarefree
GenPolynomial test if is squarefree.- Specified by:
isSquarefree
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
P
- GenPolynomial.- Returns:
- true if P is squarefree, else false.
-
isSquarefreeAlternative
-
isSquarefree
GenPolynomial list test if squarefree.- Specified by:
isSquarefree
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
L
- list of GenPolynomial.- Returns:
- true if each P in L is squarefree, else false.
-
isRecursiveSquarefree
Recursive GenPolynomial test if is squarefree.- Parameters:
P
- recursive univariate GenPolynomial.- Returns:
- true if P is squarefree, else false.
-
squarefreeFactors
GenPolynomial squarefree factorization.- Specified by:
squarefreeFactors
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
P
- GenPolynomial.- Returns:
- [p_1 -> e_1, ..., p_k -> e_k] with P = prod_{i=1,...,k} p_i^{e_i} and p_i squarefree and gcd(p_i, p_j) = 1, for i != j.
-
coPrimeSquarefree
GenPolynomial squarefree and co-prime list.- Specified by:
coPrimeSquarefree
in interfaceSquarefree<C extends GcdRingElem<C>>
- 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 and each b in B is squarefree. B does not contain zero or constant polynomials.
-
coPrimeSquarefree
GenPolynomial squarefree and co-prime list.- Specified by:
coPrimeSquarefree
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
a
- polynomial.P
- squarefree co-prime list of GenPolynomials.- Returns:
- B with gcd(b,c) = 1 for all b != c in B and for non-constant a there exists b in P with b|a. B does not contain zero or constant polynomials.
-
isCoPrimeSquarefree
Test if list of GenPolynomials is squarefree and co-prime.- Specified by:
isCoPrimeSquarefree
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
B
- list of GenPolynomials.- Returns:
- true, if for all b != c in B gcd(b,c) = 1 and each b in B is squarefree, else false.
-
normalizeFactorization
Normalize factorization. p'_i > 0 for i > 1 and p'_1 != 1 if k > 1.- Parameters:
F
- = [p_1->e_1;, ..., p_k->e_k].- Returns:
- F' = [p'_1->e_1, ..., p'_k->e_k].
-
isFactorization
GenPolynomial is (squarefree) factorization.- Specified by:
isFactorization
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
P
- GenPolynomial.F
- = [p_1, ..., p_k].- Returns:
- true if P = prod_{i=1,...,r} p_i, else false.
-
factorCount
Count number of factors in a (squarefree) factorization.- Parameters:
F
- = [p_1 -> e_1, ..., p_k -> e_k].- Returns:
- sum_{i=1,...,k} e_i.
-
isFactorization
GenPolynomial is (squarefree) factorization.- Specified by:
isFactorization
in interfaceSquarefree<C extends GcdRingElem<C>>
- Parameters:
P
- GenPolynomial.F
- = [p_1 -> e_1, ..., p_k -> e_k].- Returns:
- true if P = prod_{i=1,...,k} p_i**e_i, else false.
-
isRecursiveFactorization
public boolean isRecursiveFactorization(GenPolynomial<GenPolynomial<C>> P, SortedMap<GenPolynomial<GenPolynomial<C>>, Long> F) GenPolynomial is (squarefree) factorization.- Parameters:
P
- GenPolynomial.F
- = [p_1 -> e_1, ..., p_k -> e_k].- Returns:
- true if P = prod_{i=1,...,k} p_i**e_i, else false.
-
recursiveSquarefreePart
GenPolynomial recursive polynomial greatest squarefree divisor.- Parameters:
P
- recursive GenPolynomial.- Returns:
- squarefree(pp(P)).
-
recursiveSquarefreeFactors
public SortedMap<GenPolynomial<GenPolynomial<C>>,Long> recursiveSquarefreeFactors(GenPolynomial<GenPolynomial<C>> P) GenPolynomial recursive polynomial squarefree factorization.- Parameters:
P
- recursive GenPolynomial.- Returns:
- [p_1 -> e_1, ..., p_k -> e_k] with P = prod_{i=1,...,k} p_i^{e_i} and p_i squarefree and gcd(p_i, p_j) = 1, for i != j.
-
basePartialFraction
public List<List<GenPolynomial<C>>> basePartialFraction(GenPolynomial<C> A, SortedMap<GenPolynomial<C>, Long> D) Univariate GenPolynomial partial fraction decomposition.- Parameters:
A
- univariate GenPolynomial.D
- sorted map [d_1 -> e_1, ..., d_k -> e_k] with d_i squarefree.- Returns:
- [ [Ai0, Ai1,..., Aie_i], i=0,...,k ] with A/prod(D) = A0 + sum( sum ( Aij/di^j ) ) with deg(Aij) < deg(di).
-
isBasePartialFraction
public boolean isBasePartialFraction(GenPolynomial<C> A, SortedMap<GenPolynomial<C>, Long> D, List<List<GenPolynomial<C>>> F) Test for Univariate GenPolynomial partial fraction decomposition.- Parameters:
A
- univariate GenPolynomial.D
- sorted map [d_1 -> e_1, ..., d_k -> e_k] with d_i squarefree.F
- a list of lists [ [Ai0, Ai1,..., Aie_i], i=0,...,k ]- Returns:
- true, if A/prod(D) = A0 + sum( sum ( Aij/di^j ) ), else false.
-
squarefreePart
Coefficients greatest squarefree divisor.- Parameters:
P
- coefficient.- Returns:
- squarefree part of P.
-
squarefreeFactors
Coefficients squarefree factorization.- Parameters:
P
- coefficient.- Returns:
- [p_1 -> e_1, ..., p_k -> e_k] with P = prod_{i=1,...,k} p_i^{e_i} and p_i squarefree and gcd(p_i, p_j) = 1, for i != j.
-