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