Package datk :: Package core :: Module algs :: Class AsynchConvergecast
[hide private]
[frames] | no frames]

Class AsynchConvergecast

source code

         distalgs.Algorithm --+    
                              |    
distalgs.Asynchronous_Algorithm --+
                                  |
                                 AsynchConvergecast
Known Subclasses:

The abstract superclass of a class of Asynchronous Algorithms that propagate information from the leaves of a BFS tree to its root.

Requires:

Instance Methods [hide private]
 
is_root(self, p) source code
 
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
 
cleanup_i(self, p)
Determines what final state transition a Process, p, will perform, after the algorithm terminates.
source code
 
trans_root(self, p, msgs)
Determines the state transition the root node should undergo when it receives messages
source code
 
output_root(self, p)
Determines the output action, if any, that the root should perform at the end of the Convergecast.
source code
 
initial_msg_to_parent(self, p)
Defines the initial message sent from a leaf process to its parent at the beginning of the Convergecast
source code
 
trans_msg_to_parent(self, p, msgs)
Defines the message a non-leaf, non-root Process should send to its parent when it has received all its children's messages
source code

Inherited from distalgs.Asynchronous_Algorithm: run, run_process

Inherited from distalgs.Algorithm: __call__, __init__, cleanup, count_msg, delete, get, halt, halt_i, has, increment, output, print_algorithm_terminated, set

Class Variables [hide private]

Inherited from distalgs.Algorithm: DEFAULT, DEFAULT_PARAMS, QUIET, SILENT, VERBOSE

Method Details [hide private]

msgs_i(self, p)

source code 

Determines what messages a Process, p, will send.

Overrides: distalgs.Algorithm.msgs_i
(inherited documentation)

trans_i(self, p, msgs)

source code 

Determines what state transition a Process, p, will perform, having received messages, msgs

Overrides: distalgs.Algorithm.trans_i
(inherited documentation)

cleanup_i(self, p)

source code 

Determines what final state transition a Process, p, will perform, after the algorithm terminates.

Overrides: distalgs.Algorithm.cleanup_i
(inherited documentation)

trans_root(self, p, msgs)

source code 

Determines the state transition the root node should undergo when it receives messages

Parameters:
  • p - the root Process
  • msgs - the messages received by the root Process, from its BFS children

initial_msg_to_parent(self, p)

source code 

Defines the initial message sent from a leaf process to its parent at the beginning of the Convergecast

Parameters:
  • p - A Process at a leaf of the BFS tree
Returns:
the Message p should send to its state['parent']

trans_msg_to_parent(self, p, msgs)

source code 

Defines the message a non-leaf, non-root Process should send to its parent when it has received all its children's messages

Parameters:
  • p - a Process that has both p.state['parent'] != null, and p.state['children'] not empty
  • msgs - A list of messages from every child of p (in p.state['children'])
Returns:
the Message p should send to its state['parent']