Package edu.jas.root

Class PolyUtilRoot


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

      • logger

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

        private static final boolean debug
    • Constructor Detail

      • PolyUtilRoot

        public PolyUtilRoot()
    • Method Detail

      • convertToAlgebraicCoefficients

        public static <C extends GcdRingElem<C> & RationalGenPolynomial<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> & RationalGenPolynomial<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> & RationalGenPolynomial<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.
      • convertToRealCoefficients

        public static <C extends GcdRingElem<C> & RationalGenPolynomial<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> & RationalGenPolynomial<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.
      • complexFromAny

        public static <C extends GcdRingElem<C> & RationalGenPolynomial<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