Package mdp :: Package parallel :: Class OrderedResultContainer
[hide private]
[frames] | no frames]

Class OrderedResultContainer


Default result container with automatic restoring of the result order.

In general the order of the incoming results in the scheduler can be
different from the order of the tasks, since some tasks may finish quicker
than other tasks. This result container restores the original order.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
add_result(self, result, task_index)
Store a result in the container.
 
get_results(self)
Sort the results into the original order and return them in list.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

add_result(self, result, task_index)

 
Store a result in the container.

The task index is also stored and later used to reconstruct the
original task order.

Overrides: ResultContainer.add_result

get_results(self)

 
Sort the results into the original order and return them in list.

Overrides: ResultContainer.get_results