Class FiniteGraphA
java.lang.Object
|
+--MathSystem
|
+--FiniteGraphA
- public class FiniteGraphA
- extends MathSystem
This class represents Rotor Router system on a graph with four
vertices, two of which are sinks.
Copyright (C) 2003-2004 Hal Canary, University of
Wisconsin-Madison
Field Summary |
int |
total1
Number of bugs in the first sink |
int |
total2
Number of bugs in the second sink |
Method Summary |
void |
draw(int sizeX,
int sizeY,
Graphics gb)
draw()
Draws itself on the graphics buffer. |
String |
getInfo()
Returns a long string describing some info about current state. |
void |
iterate(int iterations)
Iterates the system. |
void |
reset()
Restarts the system. |
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 |
total1
public int total1
- Number of bugs in the first sink
total2
public int total2
- Number of bugs in the second sink
FiniteGraphA
public FiniteGraphA()
- The Constructor
reset
public void reset()
- Restarts the system. You will lose all state information.
- Overrides:
reset
in class MathSystem
subiterate
public void subiterate(int subiterations)
- Does a subiteration, if applicable.
- Overrides:
subiterate
in class MathSystem
- Parameters:
subiterations
- is the number of subiterations. Usually 1.
iterate
public void iterate(int iterations)
- Iterates the system.
- Overrides:
iterate
in class MathSystem
- Parameters:
iterations
- is the number of iterations. Usually 1.
draw
public void draw(int sizeX,
int sizeY,
Graphics gb)
- draw()
Draws itself on the graphics buffer.
- Overrides:
draw
in class MathSystem
- 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.
getInfo
public String getInfo()
- Returns a long string describing some info about current state.
- Overrides:
getInfo
in class MathSystem