graph_tool.dynamics.DiscreteStateBase#
- class graph_tool.dynamics.DiscreteStateBase(g, make_state, params, s=None, stype='int32_t')[source]#
Bases:
object
Base state for discrete-time dynamics. This class it not meant to be instantiated directly.
Methods
copy
()Return a copy of the state.
Returns list of "active" nodes, for states where this concept is used.
Returns the internal
VertexPropertyMap
with the current state.iterate_async
([niter])Updates nodes asynchronously (i.e.
iterate_sync
([niter])Updates nodes synchronously (i.e.
Resets list of "active" nodes, for states where this concept is used.
- get_state()[source]#
Returns the internal
VertexPropertyMap
with the current state.
- iterate_async(niter=1)[source]#
Updates nodes asynchronously (i.e. single vertex chosen randomly), niter number of times. This function returns the number of nodes that changed state.