|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.bio.CellularAutomata
org.generation5.bio.CellularAutomataLayered
org.generation5.demos.TermitesCA
Implements the termites algorithm, randomly sorting a collection of woodchips.
| Field Summary | |
protected double |
caPercentage
The percentage of the cellular automata within the world. |
protected double |
wcPercentage
The percentage of woodchips within the world. |
| Fields inherited from class org.generation5.bio.CellularAutomataLayered |
clrStates, collisionDetection, positionTest |
| Fields inherited from class org.generation5.bio.CellularAutomata |
bufferPosition, bufferSize, caSize, caWorld, caWorld_x, caWorld_y, clrBackground, clrGrid, clrWorld, DOUBLE_BUFFERING, doubleBuffering, drawGrid, ENCLOSED, geometryType, INFINITE, TORODIAL, X_AXIS, Y_AXIS |
| Constructor Summary | |
TermitesCA()
Default constructor. |
|
TermitesCA(int size_x,
int size_y)
Create an instance with additional size information. |
|
| Method Summary | |
void |
doStep()
Advances the world by one timestep. |
void |
init()
Initializes the world. |
static void |
main(java.lang.String[] args)
|
void |
setPercentages(double cap,
double wcp)
Set the percentages of cellular automata and woodchips. |
| Methods inherited from class org.generation5.bio.CellularAutomataLayered |
addAutomaton, addAutomaton, getCA, getCollisionDetection, getNumCAs, isCellFree, moveCAAbsolute, moveCARelative, removeAll, render, setCollisionDetection, setStateColour, setWorldSize |
| Methods inherited from class org.generation5.bio.CellularAutomata |
clearWorld, drawGrid, flipBuffer, getBackgroundColor, getCASize, getGeometry, getSizeX, getSizeY, getWorldAt, iterateCA, iterateCA, reset, setBackgroundColor, setCASize, setGeometry, setWorldAt, setWorldAtEx, setWorldAtRelative, setWorldColors, setWorldColour, translateGeometry, writeImage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected double caPercentage
protected double wcPercentage
| Constructor Detail |
public TermitesCA()
public TermitesCA(int size_x,
int size_y)
size_x - the x-size of the world.size_y - the y-size of the world.| Method Detail |
public void setPercentages(double cap,
double wcp)
cap - the cellular automata percentage.wcp - the woodchip percentage.public void init()
init in interface Steppableinit in class CellularAutomatapublic void doStep()
doStep in interface SteppabledoStep in class CellularAutomatapublic static void main(java.lang.String[] args)
args - command-line arguments to pass to iterateCA.CellularAutomata.iterateCA(CellularAutomata, String[])
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||