Previous topic

deduceEdgeState

Next topic

edgeUpdateRule

This Page

deduceNodeState

Process.deduceNodeState(node)

Gives the state of a node.

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

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

This method is responsible of returning the state of a given node 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. The resulting state should be a hashable object.

Parameters :

node : networkx node

Structure: (<node id>, {<attribute name-value map>})

Returns :

state : hashable

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