001 /* 002 * $Id: ComplexRoots.java 3364 2010-10-24 12:56:06Z kredel $ 003 */ 004 005 package edu.jas.root; 006 007 008 import java.util.List; 009 010 import edu.jas.arith.Rational; 011 import edu.jas.arith.BigRational; 012 import edu.jas.poly.Complex; 013 import edu.jas.poly.GenPolynomial; 014 import edu.jas.structure.RingElem; 015 016 017 /** 018 * Complex roots interface. 019 * @param <C> coefficient type. 020 * @author Heinz Kredel 021 */ 022 public interface ComplexRoots<C extends RingElem<C> & Rational> { 023 024 025 /** 026 * Root bound. With f(-M + i M) * f(-M - i M) * f(M - i M) * f(M + i M) != 0. 027 * @param f univariate polynomial. 028 * @return M such that root(f) is contained in the rectangle spanned by M. 029 */ 030 public Complex<C> rootBound(GenPolynomial<Complex<C>> f); 031 032 033 /** 034 * Complex root count of complex polynomial on rectangle. 035 * @param rect rectangle. 036 * @param a univariate complex polynomial. 037 * @return root count of a in rectangle. 038 */ 039 public long complexRootCount(Rectangle<C> rect, GenPolynomial<Complex<C>> a) 040 throws InvalidBoundaryException; 041 042 043 /** 044 * List of complex roots of complex polynomial a on rectangle. 045 * @param rect rectangle. 046 * @param a univariate squarefree complex polynomial. 047 * @return list of complex roots. 048 */ 049 public List<Rectangle<C>> complexRoots(Rectangle<C> rect, GenPolynomial<Complex<C>> a) 050 throws InvalidBoundaryException; 051 052 053 /** 054 * List of complex roots of complex polynomial. 055 * @param a univariate complex polynomial. 056 * @return list of complex roots. 057 */ 058 public List<Rectangle<C>> complexRoots(GenPolynomial<Complex<C>> a); 059 060 061 /** 062 * Complex root refinement of complex polynomial a on rectangle. 063 * @param rect rectangle containing exactly one complex root. 064 * @param a univariate squarefree complex polynomial. 065 * @param len rational length for refinement. 066 * @return refined complex root. 067 */ 068 public Rectangle<C> complexRootRefinement(Rectangle<C> rect, GenPolynomial<Complex<C>> a, BigRational len) 069 throws InvalidBoundaryException; 070 071 }