|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.tubs.cs.sc.casim.StateSetDefinition
StateSetDefinition represents a direct specified cellular automaton. It contains a state set, a list of transition rules, a color table and a probability table for initial condition.
TableState
,
Serialized FormConstructor Summary | |
StateSetDefinition()
Construction |
Method Summary | |
de.tubs.cs.sc.casim.TransitionRule |
addTransitionRule()
Creates a new empty TransitionRule and adds it to the list of TransitionRules |
protected int |
calculateNewState(int iOldState,
de.tubs.cs.sc.casim.State[] neighbors)
This method is used during the execution of the CA. |
boolean |
deleteTransitionRule(java.lang.String s)
Deletes the specified TransitionRule from the list |
java.awt.Color |
getColor(int iState)
|
java.lang.String |
getFileName()
returns the last used file name of the CA |
java.lang.String |
getName()
|
int |
getNrOfStates()
|
int |
getNrOfTransitionRules()
Returns the number of elements in the transition rule list. |
double |
getProbability(int iState)
|
double |
getProbabilitySum()
|
de.tubs.cs.sc.casim.TransitionRule |
getTransitionRule(int i)
Returns the i'th element of the transition rule list if exists. |
de.tubs.cs.sc.casim.TransitionRule |
getTransitionRule(java.lang.String s)
Searches through the list of TransitionRules and returns the TransitionRule if can be found |
boolean |
moveDown(java.lang.String s)
Moves the specified TransitionRule one position down in the list. |
boolean |
moveUp(java.lang.String s)
Moves the specified TransitionRule one position up in the list |
void |
setColor(int i,
java.awt.Color color)
sets the color for the specified state |
void |
setFileName(java.lang.String s)
sets the file name of the CA |
void |
setName(java.lang.String s)
sets the name of the CA |
void |
setNrOfStates(int newNrOfStates)
sets the new number of states |
void |
setProbability(int i,
double prob)
sets the probability for the specified state |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StateSetDefinition()
Method Detail |
public java.awt.Color getColor(int iState)
public void setColor(int i, java.awt.Color color)
public double getProbability(int iState)
public void setProbability(int i, double prob)
public double getProbabilitySum()
public java.lang.String getName()
public void setName(java.lang.String s)
public void setFileName(java.lang.String s)
public java.lang.String getFileName()
public int getNrOfStates()
public void setNrOfStates(int newNrOfStates)
public int getNrOfTransitionRules()
TransitionRule
public de.tubs.cs.sc.casim.TransitionRule getTransitionRule(int i)
i
- the index i to be returned
TransitionRule
public de.tubs.cs.sc.casim.TransitionRule getTransitionRule(java.lang.String s)
s
- a string returned by TransitionRule.toString representing
a transition rule
TransitionRule
public de.tubs.cs.sc.casim.TransitionRule addTransitionRule()
TransitionRule
public boolean deleteTransitionRule(java.lang.String s)
s
- a string returned by TransitionRule.toString representing
a transition rule
TransitionRule
public boolean moveUp(java.lang.String s)
s
- a string returned by TransitionRule.toString representing
a transition rule
TransitionRule
public boolean moveDown(java.lang.String s)
s
- a string returned by TransitionRule.toString representing
a transition rule
TransitionRule
protected int calculateNewState(int iOldState, de.tubs.cs.sc.casim.State[] neighbors)
iOldState
- the current state of the Cell which should be updatedneighbors
- a vector of neighbors of the cell
State
,
TransitionRule
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |