|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisidia.simulation.process.algorithm.Algorithm
visidia.simulation.process.algorithm.RuleAlgorithm
public abstract class RuleAlgorithm
Simulateur des regles de reecritures
Field Summary | |
---|---|
protected RelabelingSystem |
relSys
The relabeling System to simulate |
protected SynchronizationAlgorithm |
synal
|
protected SynchronizationObject |
synob
|
int |
synType
The synchronization used for simulation ** |
Fields inherited from class visidia.simulation.process.algorithm.Algorithm |
---|
proc |
Constructor Summary | |
---|---|
RuleAlgorithm()
default constructor. |
|
RuleAlgorithm(RelabelingSystem r)
constructor.from a relabeling system. |
|
RuleAlgorithm(RuleAlgorithm algo)
|
Method Summary | |
---|---|
int |
applyRule(int i)
this method applies the rule on position i. the contexts is in synob, modifications are also done in synob. |
abstract java.lang.Object |
clone()
|
void |
endRuleAction(int kindOfRule)
this method do actions depending of the kind of the rule. |
java.lang.String |
getDescription()
get help about the relabeling system |
java.util.Collection<MessageType> |
getMessageTypeList()
return collection of Message Types. message types are defined in misc.MSG_TYPES. this method is common to all rules simulators. |
RelabelingSystem |
getRelSys()
|
RSOptions |
getRSOptions()
get user preferences |
java.lang.String |
getState()
return the label of the node. |
SynchronizationAlgorithm |
getSynchronizationAlgorithm()
|
void |
init()
It's the algorithm of simulation of relabeling system. |
java.lang.String |
print()
used to print. |
void |
receiveAndUpdateMyState()
for RDV LC2, only LC1 should redefine it |
void |
sendMyState()
send the label to the star center if he is connected. in LC1 they are many centers, so this methode is redefined in LC1Rule. |
void |
sendUpdate()
send the states (described in synob) to synchronized neighbors. this method is used by the center after a transformation. |
void |
setMessageProcess(MessageProcess proc)
Sets the message process. |
void |
setMyState(java.lang.String newState)
|
void |
setRelSys(RelabelingSystem rs)
set the relabeling system. |
java.lang.String |
toString()
|
void |
updateNeigborhoodInfo()
this method receives from all synchronized neighbors their states, and update the information in the synob. this method works with all synchronization algorithms. |
Methods inherited from class visidia.simulation.process.algorithm.Algorithm |
---|
getArity, getEdgeProperty, getId, getNetSize, getOrientedDoors, getProperty, isIncomingDoor, isOutgoingDoor, putProperty, putProperty, receive, receiveFrom, receiveFrom, run, sendAll, sendTo, setDoorState, setEdgeProperty |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient RelabelingSystem relSys
public int synType
protected transient SynchronizationAlgorithm synal
protected transient SynchronizationObject synob
Constructor Detail |
---|
public RuleAlgorithm()
public RuleAlgorithm(RelabelingSystem r)
r
- the relabeling system to simulate.public RuleAlgorithm(RuleAlgorithm algo)
Method Detail |
---|
public void setMessageProcess(MessageProcess proc)
setMessageProcess
in class Algorithm
proc
- the new message processpublic final SynchronizationAlgorithm getSynchronizationAlgorithm()
public abstract java.lang.Object clone()
clone
in class Algorithm
public java.lang.String toString()
toString
in class java.lang.Object
public final java.util.Collection<MessageType> getMessageTypeList()
getMessageTypeList
in class Algorithm
public final java.lang.String print()
public final void updateNeigborhoodInfo()
public final void sendUpdate()
public final void setRelSys(RelabelingSystem rs)
rs
- the new relabeling system.public final RelabelingSystem getRelSys()
public void init()
init
in class Algorithm
public final void endRuleAction(int kindOfRule)
kindOfRule
- possible values defined in class SynCT.public final void sendMyState()
public final void receiveAndUpdateMyState()
public final RSOptions getRSOptions()
public final java.lang.String getState()
public final void setMyState(java.lang.String newState)
public final int applyRule(int i)
i
- position of the rule.
public final java.lang.String getDescription()
getDescription
in class Algorithm
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |