Package edu.jas.fd

Class FDUtil

java.lang.Object
edu.jas.fd.FDUtil

public class FDUtil extends Object
Solvable polynomials factorization domain utilities, for example recursive pseudo remainder.
  • Field Details

    • logger

      private static final org.apache.logging.log4j.Logger logger
    • debug

      private static final boolean debug
      See Also:
  • Constructor Details

    • FDUtil

      public FDUtil()
  • Method Details

    • leftBaseSparsePseudoRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<C> leftBaseSparsePseudoRemainder(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S)
      GenSolvablePolynomial sparse pseudo remainder for univariate polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - GenSolvablePolynomial.
      S - nonzero GenSolvablePolynomial.
      Returns:
      remainder with ore(ldcf(S)m') P = quotient * S + remainder. m' ≤ deg(P)-deg(S)
    • rightBaseSparsePseudoRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<C> rightBaseSparsePseudoRemainder(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S)
      GenSolvablePolynomial sparse right pseudo remainder for univariate polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - GenSolvablePolynomial.
      S - nonzero GenSolvablePolynomial.
      Returns:
      remainder with P ore(ldcf(S)m') = S * quotient + remainder. m' ≤ deg(P)-deg(S)
    • leftBasePseudoQuotient

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<C> leftBasePseudoQuotient(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S)
      GenSolvablePolynomial sparse pseudo quotient for univariate polynomials or exact division.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - GenSolvablePolynomial.
      S - nonzero GenSolvablePolynomial.
      Returns:
      quotient with ore(ldcf(S)m') P = quotient * S + remainder. m' ≤ deg(P)-deg(S)
    • rightBasePseudoQuotient

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<C> rightBasePseudoQuotient(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S)
      GenSolvablePolynomial right sparse pseudo quotient for univariate polynomials or exact division.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - GenSolvablePolynomial.
      S - nonzero GenSolvablePolynomial.
      Returns:
      quotient with P ore(ldcf(S)m') = S * quotient + remainder. m' ≤ deg(P)-deg(S)
    • leftBasePseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<C>[] leftBasePseudoQuotientRemainder(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S)
      GenSolvablePolynomial sparse pseudo quotient and remainder for univariate polynomials or exact division.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - GenSolvablePolynomial.
      S - nonzero GenSolvablePolynomial.
      Returns:
      [ quotient, remainder ] with ore(ldcf(S)m') P = quotient * S + remainder. m' ≤ deg(P)-deg(S)
    • rightBasePseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<C>[] rightBasePseudoQuotientRemainder(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S)
      GenSolvablePolynomial right sparse pseudo quotient and remainder for univariate polynomials or exact division.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - GenSolvablePolynomial.
      S - nonzero GenSolvablePolynomial.
      Returns:
      [ quotient, remainder ] with P ore(ldcf(S)m') = S * quotient + remainder. m' ≤ deg(P)-deg(S)
    • isLeftBasePseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> boolean isLeftBasePseudoQuotientRemainder(GenPolynomial<C> P, GenPolynomial<C> S, GenPolynomial<C> q, GenPolynomial<C> r)
      Is GenSolvablePolynomial left base pseudo quotient and remainder. For univariate polynomials. todo: Ore condition
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - base GenSolvablePolynomial.
      S - nonzero base GenSolvablePolynomial.
      Returns:
      true, if P = q * S + r, else false.
    • isRightBasePseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> boolean isRightBasePseudoQuotientRemainder(GenPolynomial<C> P, GenPolynomial<C> S, GenPolynomial<C> q, GenPolynomial<C> r)
      Is GenSolvablePolynomial right base pseudo quotient and remainder. For univariate polynomials. todo: Ore condition
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - base GenSolvablePolynomial.
      S - nonzero base GenSolvablePolynomial.
      Returns:
      true, if P = S * q + r, else false.
    • isRecursivePseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> boolean isRecursivePseudoQuotientRemainder(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S, GenSolvablePolynomial<GenPolynomial<C>> q, GenSolvablePolynomial<GenPolynomial<C>> r)
      Is recursive GenSolvablePolynomial pseudo quotient and remainder. For recursive polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      true, if P ~= q * S + r, else false.
    • recursiveSparsePseudoRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursiveSparsePseudoRemainder(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S)
      GenSolvablePolynomial sparse pseudo remainder for recursive solvable polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      remainder with ore(ldcf(S)m') P = quotient * S + remainder.
      See Also:
    • recursivePseudoQuotient

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursivePseudoQuotient(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S)
      GenSolvablePolynomial recursive pseudo quotient for recursive polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      quotient with ore(ldcf(S)m') P = quotient * S + remainder.
    • recursivePseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>>[] recursivePseudoQuotientRemainder(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S)
      GenSolvablePolynomial recursive pseudo quotient and remainder for recursive polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      [ quotient, remainder ] with ore(ldcf(S)m') P = quotient * S + remainder.
    • isRecursiveRightPseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> boolean isRecursiveRightPseudoQuotientRemainder(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S, GenSolvablePolynomial<GenPolynomial<C>> q, GenSolvablePolynomial<GenPolynomial<C>> r)
      Is recursive GenSolvablePolynomial right pseudo quotient and remainder. For recursive polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      true, if P ~= S * q + r, else false.
    • recursiveRightSparsePseudoRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursiveRightSparsePseudoRemainder(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S)
      GenSolvablePolynomial right sparse pseudo remainder for recursive solvable polynomials. Note: uses right multiplication of P by ldcf(S), not always applicable.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      remainder with P ore(ldcf(S)m') = quotient * S + remainder.
      See Also:
    • recursiveRightPseudoQuotient

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursiveRightPseudoQuotient(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S)
      GenSolvablePolynomial recursive right pseudo quotient for recursive polynomials.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      quotient with P ore(ldcf(S)m') = S * quotient + remainder.
    • recursiveRightPseudoQuotientRemainder

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>>[] recursiveRightPseudoQuotientRemainder(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S)
      GenSolvablePolynomial right sparse pseudo quotient and remainder for recursive solvable polynomials. Note: uses right multiplication of P by ldcf(S), not always applicable.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      S - nonzero recursive GenSolvablePolynomial.
      Returns:
      remainder with P ore(ldcf(S)m') = S * quotient + remainder.
      See Also:
    • recursiveDivideRightEval

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursiveDivideRightEval(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<C> s)
      GenSolvablePolynomial recursive quotient for recursive polynomials and exact division by coefficient ring element.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      s - GenSolvablePolynomial.
      Returns:
      P/s.
    • recursiveDivide

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursiveDivide(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<C> s)
      GenSolvablePolynomial left recursive quotient for recursive polynomials and exact division by coefficient ring element.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      s - GenSolvablePolynomial.
      Returns:
      q = this/s, with q * s = P.
    • recursiveRightDivide

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursiveRightDivide(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<C> s)
      GenSolvablePolynomial recursive quotient for recursive polynomials and partial right exact division by coefficient ring element.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      s - GenSolvablePolynomial.
      Returns:
      Q with s * Q = P.
    • basePseudoLeftDivide

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<C> basePseudoLeftDivide(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S)
      GenSolvablePolynomial sparse pseudo divide. For univariate polynomials or exact division.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - GenSolvablePolynomial.
      S - nonzero GenSolvablePolynomial.
      Returns:
      quotient with ldcf(S)m' P = quotient * S + remainder. m' ≤ deg(P)-deg(S)
    • recursiveLeftDivide

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> recursiveLeftDivide(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<C> s)
      GenSolvablePolynomial recursive quotient for recursive polynomials and partial left exact division by coefficient ring element.
      Type Parameters:
      C - coefficient type.
      Parameters:
      P - recursive GenSolvablePolynomial.
      s - GenSolvablePolynomial.
      Returns:
      Q with P = Q * s.
    • experimentalRecursiveLeftDivide

      static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> experimentalRecursiveLeftDivide(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<C> s)
    • integralFromQuotientCoefficients

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<GenPolynomial<C>> integralFromQuotientCoefficients(GenSolvablePolynomialRing<GenPolynomial<C>> fac, GenSolvablePolynomial<SolvableQuotient<C>> A)
      Integral solvable polynomial from solvable rational function coefficients. Represent as polynomial with integral solvable polynomial coefficients by multiplication with the lcm(??) of the numerators of the rational function coefficients.
      Parameters:
      fac - result polynomial factory.
      A - polynomial with solvable rational function coefficients to be converted.
      Returns:
      polynomial with integral solvable polynomial coefficients.
    • integralFromQuotientCoefficients

      public static <C extends GcdRingElem<C>> List<GenSolvablePolynomial<GenPolynomial<C>>> integralFromQuotientCoefficients(GenSolvablePolynomialRing<GenPolynomial<C>> fac, Collection<GenSolvablePolynomial<SolvableQuotient<C>>> L)
      Integral solvable polynomial from solvable rational function coefficients. Represent as polynomial with integral solvable polynomial coefficients by multiplication with the lcm(??) of the numerators of the solvable rational function coefficients.
      Parameters:
      fac - result polynomial factory.
      L - list of polynomials with solvable rational function coefficients to be converted.
      Returns:
      list of polynomials with integral solvable polynomial coefficients.
    • quotientFromIntegralCoefficients

      public static <C extends GcdRingElem<C>> GenSolvablePolynomial<SolvableQuotient<C>> quotientFromIntegralCoefficients(GenSolvablePolynomialRing<SolvableQuotient<C>> fac, GenSolvablePolynomial<GenPolynomial<C>> A)
      Solvable rational function from integral solvable polynomial coefficients. Represent as polynomial with type SolvableQuotient coefficients.
      Parameters:
      fac - result polynomial factory.
      A - polynomial with integral solvable polynomial coefficients to be converted.
      Returns:
      polynomial with type SolvableQuotient coefficients.
    • quotientFromIntegralCoefficients

      public static <C extends GcdRingElem<C>> List<GenSolvablePolynomial<SolvableQuotient<C>>> quotientFromIntegralCoefficients(GenSolvablePolynomialRing<SolvableQuotient<C>> fac, Collection<GenSolvablePolynomial<GenPolynomial<C>>> L)
      Solvable rational function from integral solvable polynomial coefficients. Represent as polynomial with type SolvableQuotient coefficients.
      Parameters:
      fac - result polynomial factory.
      L - list of polynomials with integral solvable polynomial coefficients to be converted.
      Returns:
      list of polynomials with type SolvableQuotient coefficients.