djfractal
Class AbstractFractalComputer

java.lang.Object
  extended bydjfractal.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

Field Summary
protected  Bounds bounds
           
protected  int[] colors
           
protected  int scale
           
protected  boolean verbose
           
 
Constructor Summary
AbstractFractalComputer()
           
 
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
 

Field Detail

colors

protected int[] colors

verbose

protected boolean verbose

scale

protected int scale

bounds

protected Bounds bounds
Constructor Detail

AbstractFractalComputer

public AbstractFractalComputer()
Method Detail

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 begins
startY - the Y value of the point this subregion begins
subRegionWidth - the width of the subregion
subRegionHeight - the height of the subregion
offsetX - the X offset in the fr.values array
offsetY - the Y offset in the fr.values array
width - the width of the fractal data the specified subregion belongs to
height - the height of the fractal data the specified subregion belongs to
fr - 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