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.
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 sizedt
.- 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 toscipy.integrate.solve_ivp()
. This solver is not suitable for stochastic ODEs.