jsci.maths.chaos
Class MandelbrotMap
- java.lang.Object
-
- 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
Fields Modifier and Type Field and Description static doubleCONVERGENT_BOUNDA complex number z such that |z| > CONVERGENT_BOUND will diverge under this map.
-
Constructor Summary
Constructors Constructor and Description MandelbrotMap(Complex aval)Constructs a Mandelbrot map.MandelbrotMap(double aval)Constructs a Mandelbrot map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ComplexgetConstant()Returns the constant.Complexiterate(int n, Complex z)Iterates the map.doubleiterate(int n, double x)Iterates the map.Complexmap(Complex z)Performs the mapping.doublemap(double x)Performs the mapping.Complexmap(double real, double imag)Performs the mapping.voidsetConstant(Complex aval)Sets the constant.
-
-
-
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:
mapin interfaceComplexMapping- Parameters:
z- a complex number.
-
map
public Complex map(double real, double imag)
Performs the mapping.- Specified by:
mapin interfaceComplexMapping
-
iterate
public double iterate(int n, double x)Iterates the map.- Parameters:
n- the number of iterationsx- the initial value
-
-
DMelt 3.0 © DataMelt by jWork.ORG