pydistsim.algorithm.network_algorithm.NetworkAlgorithm
- class NetworkAlgorithm(*args, **kwargs)[source]
Bases:
BaseAlgorithmAbstract base class for specific centralized algorithms.
This class is used as base class holding real network algorithm classes in its __subclassess__ for easy instantiation
Method __init__ and run should be implemented in subclass.
Methods
__init__add_observersapply_restrictionsApply all applicable restrictions.
check_restrictionsCheck if the restrictions are satisfied.
clear_observersCheck if the distributed algorithm has come to an end or deadlock.
is_initializednotify_observersresetReset the algorithm to its initial state.
runstepAttributes
algorithm_restrictionsTuple of restrictions that must be satisfied for the algorithm to run.
default_paramsnetworkrequired_params