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 Details

  • Constructor Details

  • Method Details

    • baseSquarefreePart

      public abstract GenPolynomial<C> baseSquarefreePart(GenPolynomial<C> P)
      GenPolynomial polynomial greatest squarefree divisor.
      Parameters:
      P - GenPolynomial.
      Returns:
      squarefree(pp(P)).
    • baseSquarefreeFactors

      public abstract SortedMap<GenPolynomial<C>,Long> baseSquarefreeFactors(GenPolynomial<C> A)
      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

      public abstract GenPolynomial<C> squarefreePart(GenPolynomial<C> P)
      GenPolynomial greatest squarefree divisor.
      Specified by:
      squarefreePart in interface Squarefree<C extends GcdRingElem<C>>
      Parameters:
      P - GenPolynomial.
      Returns:
      squarefree(P) a primitive respectively monic polynomial.
    • isSquarefree

      public boolean isSquarefree(GenPolynomial<C> P)
      GenPolynomial test if is squarefree.
      Specified by:
      isSquarefree in interface Squarefree<C extends GcdRingElem<C>>
      Parameters:
      P - GenPolynomial.
      Returns:
      true if P is squarefree, else false.
    • isSquarefreeAlternative

      boolean isSquarefreeAlternative(GenPolynomial<C> P)
    • isSquarefree

      public boolean isSquarefree(List<GenPolynomial<C>> L)
      GenPolynomial list test if squarefree.
      Specified by:
      isSquarefree in interface Squarefree<C extends GcdRingElem<C>>
      Parameters:
      L - list of GenPolynomial.
      Returns:
      true if each P in L is squarefree, else false.
    • isRecursiveSquarefree

      public boolean isRecursiveSquarefree(GenPolynomial<GenPolynomial<C>> P)
      Recursive GenPolynomial test if is squarefree.
      Parameters:
      P - recursive univariate GenPolynomial.
      Returns:
      true if P is squarefree, else false.
    • squarefreeFactors

      public abstract SortedMap<GenPolynomial<C>,Long> squarefreeFactors(GenPolynomial<C> P)
      GenPolynomial squarefree factorization.
      Specified by:
      squarefreeFactors in interface Squarefree<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

      public List<GenPolynomial<C>> coPrimeSquarefree(List<GenPolynomial<C>> A)
      GenPolynomial squarefree and co-prime list.
      Specified by:
      coPrimeSquarefree in interface Squarefree<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

      public List<GenPolynomial<C>> coPrimeSquarefree(GenPolynomial<C> a, List<GenPolynomial<C>> P)
      GenPolynomial squarefree and co-prime list.
      Specified by:
      coPrimeSquarefree in interface Squarefree<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

      public boolean isCoPrimeSquarefree(List<GenPolynomial<C>> B)
      Test if list of GenPolynomials is squarefree and co-prime.
      Specified by:
      isCoPrimeSquarefree in interface Squarefree<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

      public SortedMap<GenPolynomial<C>,Long> normalizeFactorization(SortedMap<GenPolynomial<C>,Long> F)
      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

      public boolean isFactorization(GenPolynomial<C> P, List<GenPolynomial<C>> F)
      GenPolynomial is (squarefree) factorization.
      Specified by:
      isFactorization in interface Squarefree<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

      public long factorCount(SortedMap<GenPolynomial<C>,Long> F)
      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

      public boolean isFactorization(GenPolynomial<C> P, SortedMap<GenPolynomial<C>,Long> F)
      GenPolynomial is (squarefree) factorization.
      Specified by:
      isFactorization in interface Squarefree<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

      public GenPolynomial<GenPolynomial<C>> recursiveSquarefreePart(GenPolynomial<GenPolynomial<C>> P)
      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

      public C squarefreePart(C P)
      Coefficients greatest squarefree divisor.
      Parameters:
      P - coefficient.
      Returns:
      squarefree part of P.
    • squarefreeFactors

      public abstract SortedMap<C,Long> squarefreeFactors(C P)
      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.