Abstract superclass for a distributed algorithm.
|
|
|
msgs_i(self,
p)
Determines what messages a Process, p, will send. |
source code
|
|
|
trans_i(self,
p,
msgs)
Determines what state transition a Process, p, will perform, having
received messages, msgs |
source code
|
|
|
halt_i(self,
p)
Returns True iff Process p has halted execution of the algorithm |
source code
|
|
|
cleanup_i(self,
p)
Determines what final state transition a Process, p, will perform,
after the algorithm terminates. |
source code
|
|
|
cleanup(self)
Calls cleanup_i on all processes |
source code
|
|
|
__call__(self,
network,
params={ } )
Same as run, allows an algorithm, A, to be executed like this: A() |
source code
|
|
|
run(self,
network,
params={ } )
Executes the algorithm on the network |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
output(self,
process,
key,
val)
Sets the publicly visible value of process.state[key] to val |
source code
|
|