Package datk :: Package core :: Module distalgs :: Class Network
[hide private]
[frames] | no frames]

Class Network

source code

Known Subclasses:

A collection of Processes that know n, the # of processes in the network.

Instance Methods [hide private]
 
__getitem__(self, i) source code
 
__init__(self, n, index_to_UID=None)
Creates a network of n disconnected Processes, with random distinct UIDs, or as specified by the index_to_UID function
source code
 
__iter__(self) source code
 
__len__(self) source code
 
__repr__(self) source code
 
add(self, algorithm)
Awakens all Processes in the Network with respect to algorithm
source code
 
clone(self) source code
 
draw(self)
Draws the Network
source code
 
index(self, p) source code
 
run(self, algorithm)
Runs algorithm on the Network
source code
 
state(self)
Returns: A text representation of the state of all the Processes in the Network
source code
Method Details [hide private]

state(self)

source code 
Returns:
A text representation of the state of all the Processes in the Network