pydistsim.restrictions.communication.ReciprocalCommunication

class ReciprocalCommunication[source]

Bases: CommunicationRestriction

For all nodes, the set of out-neighbors is the same as the set of in-neighbors.

Methods

__init__

check

True if the network is undirected or the set of out-neighbors is the same as the set of in-neighbors.

get_help_message

Attributes

help_message

in-neighbors.

classmethod check(network: NetworkType) bool[source]

True if the network is undirected or the set of out-neighbors is the same as the set of in-neighbors.

help_message = 'The network is not reciprocal. All nodes should have the same set of out-neighbors and '

in-neighbors. You may want to use an undirected network or transform the network to be reciprocal (add the