Package edu.jas.root

Class PolyUtilRoot

java.lang.Object
edu.jas.root.PolyUtilRoot

public class PolyUtilRoot extends Object
Polynomial utilities related to real and complex roots.
  • Field Details

    • logger

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

      private static final boolean debug
  • Constructor Details

    • PolyUtilRoot

      public PolyUtilRoot()
  • Method Details

    • convertToAlgebraicCoefficients

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<RealAlgebraicNumber<C>> convertToAlgebraicCoefficients(GenPolynomialRing<RealAlgebraicNumber<C>> pfac, GenPolynomial<C> A)
      Convert to RealAlgebraicNumber coefficients. Represent as polynomial with RealAlgebraicNumber coefficients, C is e.g. ModInteger or BigRational.
      Parameters:
      pfac - result polynomial factory.
      A - polynomial with C coefficients to be converted.
      Returns:
      polynomial with RealAlgebraicNumber<C> coefficients.
    • convertToRecAlgebraicCoefficients

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<RealAlgebraicNumber<C>> convertToRecAlgebraicCoefficients(int depth, GenPolynomialRing<RealAlgebraicNumber<C>> pfac, GenPolynomial<C> A)
      Convert to recursive RealAlgebraicNumber coefficients. Represent as polynomial with recursive RealAlgebraicNumber coefficients, C is e.g. ModInteger or BigRational.
      Parameters:
      depth - recursion depth of RealAlgebraicNumber coefficients.
      pfac - result polynomial factory.
      A - polynomial with C coefficients to be converted.
      Returns:
      polynomial with RealAlgebraicNumber<C> coefficients.
    • convertRecursiveToAlgebraicCoefficients

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<RealAlgebraicNumber<C>> convertRecursiveToAlgebraicCoefficients(GenPolynomialRing<RealAlgebraicNumber<C>> pfac, GenPolynomial<GenPolynomial<C>> A)
      Convert to RealAlgebraicNumber coefficients. Represent as polynomial with RealAlgebraicNumber coefficients, C is e.g. ModInteger or BigRational.
      Parameters:
      pfac - result polynomial factory.
      A - recursive polynomial with GenPolynomial<BigInteger> coefficients to be converted.
      Returns:
      polynomial with RealAlgebraicNumber<C> coefficients.
    • algebraicFromRealCoefficients

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<AlgebraicNumber<C>> algebraicFromRealCoefficients(GenPolynomialRing<AlgebraicNumber<C>> afac, GenPolynomial<RealAlgebraicNumber<C>> A)
      Convert to AlgebraicNumber coefficients. Represent as polynomial with AlgebraicNumber coefficients.
      Parameters:
      afac - result polynomial factory.
      A - polynomial with RealAlgebraicNumber<C> coefficients to be converted.
      Returns:
      polynomial with AlgebraicNumber<C> coefficients.
    • realFromAlgebraicCoefficients

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<RealAlgebraicNumber<C>> realFromAlgebraicCoefficients(GenPolynomialRing<RealAlgebraicNumber<C>> rfac, GenPolynomial<AlgebraicNumber<C>> A)
      Convert to RealAlgebraicNumber coefficients. Represent as polynomial with RealAlgebraicNumber coefficients.
      Parameters:
      rfac - result polynomial factory.
      A - polynomial with AlgebraicNumber<C> coefficients to be converted.
      Returns:
      polynomial with RealAlgebraicNumber<C> coefficients.
    • convertToRealCoefficients

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<RealAlgebraicNumber<C>> convertToRealCoefficients(GenPolynomialRing<RealAlgebraicNumber<C>> pfac, GenPolynomial<C> A)
      Convert to RealAlgebraicNumber coefficients. Represent as polynomial with RealAlgebraicNumber coefficients, C is e.g. BigRational.
      Parameters:
      pfac - result polynomial factory.
      A - polynomial with C coefficients to be converted.
      Returns:
      polynomial with RealAlgebraicNumber<C> coefficients.
    • convertToComplexCoefficients

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<ComplexAlgebraicNumber<C>> convertToComplexCoefficients(GenPolynomialRing<ComplexAlgebraicNumber<C>> pfac, GenPolynomial<C> A)
      Convert to ComplexAlgebraicNumber coefficients. Represent as polynomial with ComplexAlgebraicNumber coefficients, C is e.g. BigRational.
      Parameters:
      pfac - result polynomial factory.
      A - polynomial with C coefficients to be converted.
      Returns:
      polynomial with ComplexAlgebraicNumber<C> coefficients.
    • convertToComplexCoefficientsFromComplex

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<ComplexAlgebraicNumber<C>> convertToComplexCoefficientsFromComplex(GenPolynomialRing<ComplexAlgebraicNumber<C>> pfac, GenPolynomial<Complex<C>> A)
      Convert to ComplexAlgebraicNumber coefficients. Represent as polynomial with ComplexAlgebraicNumber coefficients, C is e.g. BigRational.
      Parameters:
      pfac - result polynomial factory.
      A - polynomial with C coefficients to be converted.
      Returns:
      polynomial with ComplexAlgebraicNumber<C> coefficients.
    • complexFromAny

      public static <C extends GcdRingElem<C> & Rational> GenPolynomial<Complex<C>> complexFromAny(GenPolynomial<C> f)
      Convert to Complex coefficients. Represent as polynomial with Complex<C> coefficients.
      Parameters:
      f - univariate polynomial.
      Returns:
      f with complex coefficients