toxi.sim.automata
Class CARule2D

java.lang.Object
  extended by toxi.sim.automata.CARule2D
All Implemented Interfaces:
CARule, MatrixEvolver

public class CARule2D
extends java.lang.Object
implements CARule


Constructor Summary
CARule2D(byte[] brules, byte[] srules, int st, boolean tiled)
           
 
Method Summary
 void evolve(EvolvableMatrix m)
           
 int getStateCount()
           
 boolean isAutoExpire()
           
 boolean isTiling()
           
 void randomize()
           
 void setAutoExpire(boolean state)
           
 void setBirthRules(byte[] b)
           
 void setRandomProbabilities(float birth, float survival)
           
 void setStateCount(int num)
           
 void setSurvivalRules(byte[] s)
           
 void setTiling(boolean state)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CARule2D

public CARule2D(byte[] brules,
                byte[] srules,
                int st,
                boolean tiled)
Method Detail

evolve

public void evolve(EvolvableMatrix m)
Specified by:
evolve in interface MatrixEvolver

getStateCount

public int getStateCount()
Specified by:
getStateCount in interface CARule

isAutoExpire

public boolean isAutoExpire()
Specified by:
isAutoExpire in interface CARule

isTiling

public boolean isTiling()
Specified by:
isTiling in interface CARule

randomize

public void randomize()
Specified by:
randomize in interface CARule

setAutoExpire

public void setAutoExpire(boolean state)
Specified by:
setAutoExpire in interface CARule

setBirthRules

public void setBirthRules(byte[] b)

setRandomProbabilities

public void setRandomProbabilities(float birth,
                                   float survival)

setStateCount

public void setStateCount(int num)
Specified by:
setStateCount in interface CARule

setSurvivalRules

public void setSurvivalRules(byte[] s)

setTiling

public void setTiling(boolean state)
Specified by:
setTiling in interface CARule