Package edu.jas.root
Class ComplexRootsAbstract<C extends RingElem<C> & Rational>
- java.lang.Object
-
- edu.jas.root.ComplexRootsAbstract<C>
-
- Type Parameters:
C- coefficient type.
- All Implemented Interfaces:
ComplexRoots<C>,java.io.Serializable
- Direct Known Subclasses:
ComplexRootsSturm
public abstract class ComplexRootsAbstract<C extends RingElem<C> & Rational> extends java.lang.Object implements ComplexRoots<C>
Complex roots abstract class.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Squarefree<Complex<C>>engineEngine for square free decomposition.
-
Constructor Summary
Constructors Constructor Description ComplexRootsAbstract(RingFactory<Complex<C>> cf)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Complex<BigDecimal>approximateRoot(Rectangle<C> rt, GenPolynomial<Complex<C>> f, BigRational eps)Approximate complex root.java.util.List<Complex<BigDecimal>>approximateRoots(GenPolynomial<Complex<C>> a, BigRational eps)List of decimal approximations of complex roots of complex polynomial.Complex<C>complexMagnitude(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g, BigRational eps)Complex algebraic number magnitude.Complex<C>complexRectangleMagnitude(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g)Complex algebraic number magnitude.abstract longcomplexRootCount(Rectangle<C> rect, GenPolynomial<Complex<C>> a)Complex root count of complex polynomial on rectangle.Rectangle<C>complexRootRefinement(Rectangle<C> rect, GenPolynomial<Complex<C>> a, BigRational len)Complex root refinement of complex polynomial a on rectangle.java.util.List<Rectangle<C>>complexRoots(GenPolynomial<Complex<C>> a)List of complex roots of complex polynomial.java.util.List<Rectangle<C>>complexRoots(GenPolynomial<Complex<C>> a, BigRational len)List of complex roots of complex polynomial.abstract java.util.List<Rectangle<C>>complexRoots(Rectangle<C> rect, GenPolynomial<Complex<C>> a)List of complex roots of complex polynomial a on rectangle.Complex[]copyOfComplex(Complex[] original, int newLength)Copy the specified array.Rectangle<C>invariantMagnitudeRectangle(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g, BigRational eps)Invariant rectangle for algebraic number magnitude.abstract Rectangle<C>invariantRectangle(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g)Invariant rectangle for algebraic number.CmagnitudeBound(Rectangle<C> rect, GenPolynomial<Complex<C>> f)Magnitude bound.Complex<C>rootBound(GenPolynomial<Complex<C>> f)Root bound.java.lang.StringtoDecimal(Complex<C> a)Get decimal approximation.
-
-
-
Constructor Detail
-
ComplexRootsAbstract
public ComplexRootsAbstract(RingFactory<Complex<C>> cf)
Constructor.- Parameters:
cf- coefficient factory.
-
-
Method Detail
-
rootBound
public Complex<C> rootBound(GenPolynomial<Complex<C>> f)
Root bound. With f(-M + i M) * f(-M - i M) * f(M - i M) * f(M + i M) != 0.
-
magnitudeBound
public C magnitudeBound(Rectangle<C> rect, GenPolynomial<Complex<C>> f)
Magnitude bound.- Parameters:
rect- rectangle.f- univariate polynomial.- Returns:
- B such that |f(c)| < B for c in rect.
-
complexRootCount
public abstract long complexRootCount(Rectangle<C> rect, GenPolynomial<Complex<C>> a) throws InvalidBoundaryException
Complex root count of complex polynomial on rectangle.- Specified by:
complexRootCountin interfaceComplexRoots<C extends RingElem<C> & Rational>- Parameters:
rect- rectangle.a- univariate complex polynomial.- Returns:
- root count of a in rectangle.
- Throws:
InvalidBoundaryException
-
complexRoots
public abstract java.util.List<Rectangle<C>> complexRoots(Rectangle<C> rect, GenPolynomial<Complex<C>> a) throws InvalidBoundaryException
List of complex roots of complex polynomial a on rectangle.- Specified by:
complexRootsin interfaceComplexRoots<C extends RingElem<C> & Rational>- Parameters:
rect- rectangle.a- univariate squarefree complex polynomial.- Returns:
- list of complex roots.
- Throws:
InvalidBoundaryException
-
complexRoots
public java.util.List<Rectangle<C>> complexRoots(GenPolynomial<Complex<C>> a)
List of complex roots of complex polynomial.- Specified by:
complexRootsin interfaceComplexRoots<C extends RingElem<C> & Rational>- Parameters:
a- univariate complex polynomial.- Returns:
- list of complex roots.
-
complexRootRefinement
public Rectangle<C> complexRootRefinement(Rectangle<C> rect, GenPolynomial<Complex<C>> a, BigRational len) throws InvalidBoundaryException
Complex root refinement of complex polynomial a on rectangle.- Specified by:
complexRootRefinementin interfaceComplexRoots<C extends RingElem<C> & Rational>- Parameters:
rect- rectangle containing exactly one complex root.a- univariate squarefree complex polynomial.len- rational length for refinement.- Returns:
- refined complex root.
- Throws:
InvalidBoundaryException
-
complexRoots
public java.util.List<Rectangle<C>> complexRoots(GenPolynomial<Complex<C>> a, BigRational len)
List of complex roots of complex polynomial.- Parameters:
a- univariate complex polynomial.len- rational length for refinement.- Returns:
- list of complex roots to desired precision.
-
invariantRectangle
public abstract Rectangle<C> invariantRectangle(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g) throws InvalidBoundaryException
Invariant rectangle for algebraic number.- Parameters:
rect- root isolating rectangle for f which contains exactly one root.f- univariate polynomial, non-zero.g- univariate polynomial, gcd(f,g) == 1.- Returns:
- v with v a new rectangle contained in iv such that g(w) != 0 for w in v.
- Throws:
InvalidBoundaryException
-
toDecimal
public java.lang.String toDecimal(Complex<C> a)
Get decimal approximation.- Parameters:
a- complex number.- Returns:
- decimal(a).
-
approximateRoot
public Complex<BigDecimal> approximateRoot(Rectangle<C> rt, GenPolynomial<Complex<C>> f, BigRational eps) throws NoConvergenceException
Approximate complex root.- Parameters:
rt- root isolating rectangle.f- univariate polynomial, non-zero.eps- requested interval length.- Returns:
- a decimal approximation d such that |d-v| < eps, for f(v) = 0, v in rt.
- Throws:
NoConvergenceException
-
approximateRoots
public java.util.List<Complex<BigDecimal>> approximateRoots(GenPolynomial<Complex<C>> a, BigRational eps)
List of decimal approximations of complex roots of complex polynomial.- Parameters:
a- univariate complex polynomial.eps- length for refinement.- Returns:
- list of complex decimal root approximations to desired precision.
-
copyOfComplex
public Complex[] copyOfComplex(Complex[] original, int newLength)
Copy the specified array.- Parameters:
original- array.newLength- new array length.- Returns:
- copy of this.
-
invariantMagnitudeRectangle
public Rectangle<C> invariantMagnitudeRectangle(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g, BigRational eps) throws InvalidBoundaryException
Invariant rectangle for algebraic number magnitude.- Parameters:
rect- root isolating rectangle for f which contains exactly one root.f- univariate polynomial, non-zero.g- univariate polynomial, gcd(f,g) == 1.eps- length limit for rectangle length.- Returns:
- v with v a new rectangle contained in rect such that |g(a) - g(b)| < eps for a, b in v in rect.
- Throws:
InvalidBoundaryException
-
complexRectangleMagnitude
public Complex<C> complexRectangleMagnitude(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g)
Complex algebraic number magnitude.- Parameters:
rect- root isolating rectangle for f which contains exactly one root, with rect such that |g(a) - g(b)| < eps for a, b in rect.f- univariate polynomial, non-zero.g- univariate polynomial, gcd(f,g) == 1.- Returns:
- g(rect) .
-
complexMagnitude
public Complex<C> complexMagnitude(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g, BigRational eps) throws InvalidBoundaryException
Complex algebraic number magnitude.- Parameters:
rect- root isolating rectangle for f which contains exactly one root, with rect such that |g(a) - g(b)| < eps for a, b in rect.f- univariate polynomial, non-zero.g- univariate polynomial, gcd(f,g) == 1.eps- length limit for rectangle length.- Returns:
- g(rect) .
- Throws:
InvalidBoundaryException
-
-