djfractal
Class AbstractFractalComputer
java.lang.Object
djfractal.AbstractFractalComputer
- All Implemented Interfaces:
- FractalComputer, java.io.Serializable
- Direct Known Subclasses:
- APFractalComputer, FastFractalComputer
- public abstract class AbstractFractalComputer
- extends java.lang.Object
- implements FractalComputer
Abstract class which computes discrepancy.
- See Also:
FractalComputer
,
Serialized Form
Method Summary |
protected abstract void |
_init(int iterations,
java.math.BigDecimal bailout)
|
protected abstract int |
calculate(java.math.BigDecimal cr,
java.math.BigDecimal ci)
|
FractalResult |
calculateAll(FractalData fd)
|
FractalResult |
discrepancy(FractalData fd)
|
void |
init(int iterations,
java.math.BigDecimal bailout,
int scale,
Bounds bounds,
int[] colors,
boolean verbose)
|
static void |
insert(java.lang.String[] args,
FractalComputer fc)
|
protected abstract void |
subRegion(int startX,
int startY,
int subRegionWidth,
int subRegionHeight,
int offsetX,
int offsetY,
int width,
int height,
FractalResult fr)
Compute a subRegion of a fractal data. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
colors
protected int[] colors
verbose
protected boolean verbose
scale
protected int scale
bounds
protected Bounds bounds
AbstractFractalComputer
public AbstractFractalComputer()
init
public final void init(int iterations,
java.math.BigDecimal bailout,
int scale,
Bounds bounds,
int[] colors,
boolean verbose)
- Specified by:
init
in interface FractalComputer
_init
protected abstract void _init(int iterations,
java.math.BigDecimal bailout)
calculateAll
public final FractalResult calculateAll(FractalData fd)
- Specified by:
calculateAll
in interface FractalComputer
subRegion
protected abstract void subRegion(int startX,
int startY,
int subRegionWidth,
int subRegionHeight,
int offsetX,
int offsetY,
int width,
int height,
FractalResult fr)
Compute a subRegion of a fractal data.
This method is invoked by calculateAll(FractalData fd)
to
prevent the computation of precomputed corners.
- Parameters:
startX
- the X value of the point this subregion beginsstartY
- the Y value of the point this subregion beginssubRegionWidth
- the width of the subregionsubRegionHeight
- the height of the subregionoffsetX
- the X offset in the fr.values
arrayoffsetY
- the Y offset in the fr.values
arraywidth
- the width of the fractal data the specified subregion
belongs toheight
- the height of the fractal data the specified subregion
belongs tofr
- the FractalResult
object to fill
calculate
protected abstract int calculate(java.math.BigDecimal cr,
java.math.BigDecimal ci)
discrepancy
public final FractalResult discrepancy(FractalData fd)
- Specified by:
discrepancy
in interface FractalComputer
toString
public java.lang.String toString()
insert
public static void insert(java.lang.String[] args,
FractalComputer fc)
DJFractal help mailing list