Previous topic

__init__

Next topic

deduceNodeState

This Page

deduceEdgeState

Process.deduceEdgeState(edge)

Gives the state of an edge.

Overload this method to provide a state given a edge in a network.

This is based on the design assumption that we have a finite number of states in which an edge may reside at any point in time. Internally however a process may or may not explicitly keep track of in which state an edge currently is. (For instance there may be a large number of parameters associated with a edge, and not an explicit state.)

This method is responsible of returning the state of a given edge structure according to the process. For processes explicitly keeping track of the state it only needs to return said state. For other types of processes some calculations may be necessary.

Parameters :

edge : networkx edge

Structure (<node id 1>, <node id 2>, <attribute dict>)

Returns :

state : hashable

The method should in some way come up with a state descriptor from from edge and return it. The state representation must be a hashable object.