Package edu.jas.root
Class PolyUtilRoot
- java.lang.Object
-
- edu.jas.root.PolyUtilRoot
-
public class PolyUtilRoot extends java.lang.Object
Polynomial utilities related to real and complex roots.- Author:
- Heinz Kredel
-
-
Constructor Summary
Constructors Constructor Description PolyUtilRoot()
-
Method Summary
-
-
-
Constructor Detail
-
PolyUtilRoot
public PolyUtilRoot()
-
-
Method Detail
-
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 RealAlgebraicNumbercoefficients, 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 RealAlgebraicNumbercoefficients, 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 RealAlgebraicNumbercoefficients, 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 AlgebraicNumbercoefficients. - 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 RealAlgebraicNumbercoefficients. - 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 RealAlgebraicNumbercoefficients, 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 ComplexAlgebraicNumbercoefficients, 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 ComplexAlgebraicNumbercoefficients, 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
-
-