|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.tubs.cs.sc.casim.State | +--de.tubs.cs.sc.casim.TableState
A state class driven by a given state set and transition rule list. Base class for exported classes from state set and transition rule list.
Field Summary | |
protected int |
condition
|
Constructor Summary | |
TableState()
Constructor set's current state to 0 |
Method Summary | |
void |
copy(de.tubs.cs.sc.casim.State s)
copies the state member from s to current |
protected boolean |
doesNeighborhoodMatch(int[] rule,
de.tubs.cs.sc.casim.State[] neighbors)
|
boolean |
equals(java.lang.Object obj)
Default implementation for virtual Object.equals |
java.awt.Color |
getColor()
returns the color of current state using the ColorTable of state set definition |
int |
getCondition()
|
protected static int |
getConditionFromProbability(double p)
Calculates the initial state in dependence of the probability p. |
int |
getNrOfStates()
|
static int |
getNrOfStatesStatic()
|
static double |
getProbability(int iState)
|
static de.tubs.cs.sc.casim.StateSetDefinition |
getStateDefinition()
|
static void |
initialize(de.tubs.cs.sc.casim.Lattice l)
Initializes the lattice with the given probabilities for each state of the set. |
void |
setCondition(int c)
|
protected static void |
setStateDefinition(de.tubs.cs.sc.casim.StateSetDefinition ssd)
sets the static reference of StateSetDefinition to ssd is called only once from CellularAutomat |
java.lang.String |
toString()
returns a String representation of the TableState |
void |
transition(de.tubs.cs.sc.casim.Cell cell)
performs the transition from the current state to the new calculated state using the StateSetDefinition |
Methods inherited from class de.tubs.cs.sc.casim.State |
getComponent, getConstant, getConstant, getIcon, globalTransition, hashCode, initialize |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int condition
Constructor Detail |
public TableState()
Method Detail |
public static void initialize(de.tubs.cs.sc.casim.Lattice l)
public java.awt.Color getColor()
getColor
in class State
StateSetDefinition
public static double getProbability(int iState)
protected static int getConditionFromProbability(double p)
public void copy(de.tubs.cs.sc.casim.State s)
copy
in class State
public void transition(de.tubs.cs.sc.casim.Cell cell)
transition
in class State
StateSetDefinition
protected static void setStateDefinition(de.tubs.cs.sc.casim.StateSetDefinition ssd)
public static de.tubs.cs.sc.casim.StateSetDefinition getStateDefinition()
public int getCondition()
public void setCondition(int c)
public java.lang.String toString()
toString
in class State
public boolean equals(java.lang.Object obj)
State
equals
in class State
public int getNrOfStates()
public static int getNrOfStatesStatic()
protected boolean doesNeighborhoodMatch(int[] rule, de.tubs.cs.sc.casim.State[] neighbors)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |