Class MathSystem

java.lang.Object
  |
  +--MathSystem
Direct Known Subclasses:
FiniteGraphA, FiniteGraphB, FiniteGraphC, OneDeeAgg, OneDeeWalk, TwoDeeAggregation, TwoDeeWalk

public abstract class MathSystem
extends Object

MathSystem Class: this class represents a generic mathematical system. Subclass this to make use of its interface.


Field Summary
 int n
          Current Iteration Number
 int subit
          Current Subiteration Number
 
Constructor Summary
MathSystem()
          The Constructor.
 
Method Summary
 int animateNum()
          Override this function if you want the system to hava an animation.
abstract  void draw(int sizeX, int sizeY, Graphics gb)
          Draws the current state of the sytem on the graphics buffer.
 void drawAnimate(int sizeX, int sizeY, Graphics gb, int animate)
          Override this function if you want the system to hava an animation.
 String getInfo()
          Returns a long string describing some info about current state.
abstract  void iterate(int iterations)
          Iterates the system.
abstract  void reset()
          Restarts the system.
abstract  void subiterate(int subiterations)
          Does a subiteration, if applicable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

n

public int n
Current Iteration Number

subit

public int subit
Current Subiteration Number
Constructor Detail

MathSystem

public MathSystem()
The Constructor.
Method Detail

draw

public abstract void draw(int sizeX,
                          int sizeY,
                          Graphics gb)
Draws the current state of the sytem on the graphics buffer.
Parameters:
sizeX - is the x size of region on which to draw.
sizeY - is the y size of region on which to draw.
gb - is the graphics buffer on which to draw. It may be from an image or a canvas.

iterate

public abstract void iterate(int iterations)
Iterates the system.
Parameters:
iterations - is the number of iterations. Usually 1.

subiterate

public abstract void subiterate(int subiterations)
Does a subiteration, if applicable.
Parameters:
subiterations - is the number of subiterations. Usually 1.

reset

public abstract void reset()
Restarts the system. You will lose all state information.

getInfo

public String getInfo()
Returns a long string describing some info about current state. Override if you want such a function.

animateNum

public int animateNum()
Override this function if you want the system to hava an animation. Returns number of intermediate steps in the animation.

drawAnimate

public void drawAnimate(int sizeX,
                        int sizeY,
                        Graphics gb,
                        int animate)
Override this function if you want the system to hava an animation. Draws the Nth intermediate animation. 1 <= aniamte <= animateNum(). for (int animate = 1; animate <= animateNum(); animate++)