JSci.maths.chaos
Class MandelbrotMap

java.lang.Object
  extended by JSci.maths.chaos.MandelbrotMap
All Implemented Interfaces:
ComplexMapping

public final class MandelbrotMap
extends java.lang.Object
implements ComplexMapping

The MandelbrotMap class provides an object that encapsulates the Mandelbrot map. zn+1 = zn2 + c.


Field Summary
static double CONVERGENT_BOUND
          A complex number z such that |z| > CONVERGENT_BOUND will diverge under this map.
 
Constructor Summary
MandelbrotMap(Complex aval)
          Constructs a Mandelbrot map.
MandelbrotMap(double aval)
          Constructs a Mandelbrot map.
 
Method Summary
 Complex getConstant()
          Returns the constant.
 Complex iterate(int n, Complex z)
          Iterates the map.
 double iterate(int n, double x)
          Iterates the map.
 Complex map(Complex z)
          Performs the mapping.
 double map(double x)
          Performs the mapping.
 Complex map(double real, double imag)
          Performs the mapping.
 void setConstant(Complex aval)
          Sets the constant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERGENT_BOUND

public static final double CONVERGENT_BOUND
A complex number z such that |z| > CONVERGENT_BOUND will diverge under this map.

See Also:
Constant Field Values
Constructor Detail

MandelbrotMap

public MandelbrotMap(double aval)
Constructs a Mandelbrot map.

Parameters:
aval - the value of the constant.

MandelbrotMap

public MandelbrotMap(Complex aval)
Constructs a Mandelbrot map.

Parameters:
aval - the value of the constant.
Method Detail

getConstant

public Complex getConstant()
Returns the constant.


setConstant

public void setConstant(Complex aval)
Sets the constant.


map

public double map(double x)
Performs the mapping.

Parameters:
x - a double

map

public Complex map(Complex z)
Performs the mapping.

Specified by:
map in interface ComplexMapping
Parameters:
z - a complex number.

map

public Complex map(double real,
                   double imag)
Performs the mapping.

Specified by:
map in interface ComplexMapping

iterate

public double iterate(int n,
                      double x)
Iterates the map.

Parameters:
n - the number of iterations
x - the initial value

iterate

public Complex iterate(int n,
                       Complex z)
Iterates the map.

Parameters:
n - the number of iterations
z - the initial value