java.lang.Object
edu.jas.root.ComplexRootsAbstract<C>
- Type Parameters:
C- coefficient type.
- All Implemented Interfaces:
ComplexRoots<C>, Serializable
- Direct Known Subclasses:
ComplexRootsSturm
public abstract class ComplexRootsAbstract<C extends RingElem<C> & Rational>
extends Object
implements ComplexRoots<C>
Complex roots abstract class.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapproximateRoot(Rectangle<C> rt, GenPolynomial<Complex<C>> f, BigRational eps) Approximate complex root.approximateRoots(GenPolynomial<Complex<C>> a, BigRational eps) List of decimal approximations of complex roots of complex polynomial.complexMagnitude(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g, BigRational eps) Complex algebraic number magnitude.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.complexRootRefinement(Rectangle<C> rect, GenPolynomial<Complex<C>> a, BigRational len) Complex root refinement of complex polynomial a on rectangle.List of complex roots of complex polynomial.complexRoots(GenPolynomial<Complex<C>> a, BigRational len) List of complex roots of complex polynomial.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.invariantMagnitudeRectangle(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g, BigRational eps) Invariant rectangle for algebraic number magnitude.invariantRectangle(Rectangle<C> rect, GenPolynomial<Complex<C>> f, GenPolynomial<Complex<C>> g) Invariant rectangle for algebraic number.magnitudeBound(Rectangle<C> rect, GenPolynomial<Complex<C>> f) Magnitude bound.rootBound(GenPolynomial<Complex<C>> f) Root bound.Get decimal approximation.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
engine
-
-
Constructor Details
-
ComplexRootsAbstract
Constructor.- Parameters:
cf- coefficient factory.
-
-
Method Details
-
rootBound
Root bound. With f(-M + i M) * f(-M - i M) * f(M - i M) * f(M + i M) != 0. -
magnitudeBound
-
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 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
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
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
-
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
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
-
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
-