ContinuousStateBase#

class graph_tool.dynamics.ContinuousStateBase(g, make_state, params, t0=0, s=None, stype='double')[source]#

Bases: object

Base state for continuous-time dynamics. This class it not meant to be instantiated directly.

Methods

copy()

Return a copy of the state.

get_diff(dt)

Returns the current time derivative for all the nodes.

get_state()

Returns the internal VertexPropertyMap with the current state.

solve(t, *args, **kwargs)

Integrate the system up to time t.

solve_euler(t[, dt])

Integrate the system up o time t using a simple Euler's method with step size dt.

copy()[source]#

Return a copy of the state.

get_diff(dt)[source]#

Returns the current time derivative for all the nodes. The parameter dt is the time interval in consideration, which is used only if the ODE has a stochastic component.

Parallel implementation.

If enabled during compilation, this algorithm will run in parallel using OpenMP. See the parallel algorithms section for information about how to control several aspects of parallelization.

get_state()[source]#

Returns the internal VertexPropertyMap with the current state.

solve(t, *args, **kwargs)[source]#

Integrate the system up to time t. The remaining parameters are passed to scipy.integrate.solve_ivp(). This solver is not suitable for stochastic ODEs.

solve_euler(t, dt=0.001)[source]#

Integrate the system up o time t using a simple Euler’s method with step size dt. This solver is suitable for stochastic ODEs.