geometry
Class ComplexPolynomial

java.lang.Object
  extended by geometry.ComplexPolynomial
All Implemented Interfaces:
PlanarMap

public class ComplexPolynomial
extends Object
implements PlanarMap

This class is meant to demonstrate the PlanarMap interface.


Constructor Summary
ComplexPolynomial(Complex... coefficients)
          Creates a polynomial from a list of coefficients in order of increasing degree.
 
Method Summary
 Complex map(Complex z)
          Evaluate the polynomial at z.
 String toString()
          Return a string describing the polynomial as a map of the Complex plane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ComplexPolynomial

public ComplexPolynomial(Complex... coefficients)
Creates a polynomial from a list of coefficients in order of increasing degree. Note that the ellipsis (...) indicates that the parameters are a list of complex numbers. For instance, this can be called with "new ComplexPolynomial(a0,a1,a2)" to construct the polynomial "a0+a1*z+a2*z^2."

Method Detail

map

public Complex map(Complex z)
Evaluate the polynomial at z.

Specified by:
map in interface PlanarMap

toString

public String toString()
Return a string describing the polynomial as a map of the Complex plane.

Overrides:
toString in class Object


Java Tutorial for Mathematics Students