from brian2 import StateUpdateMethod)
__call__(equations[, variables, method_options])
Generate abstract code from equations.
apply_stateupdater(equations, variables, method)
Applies a given state updater to equations.
Register a state updater.
__call__(equations, variables=None, method_options=None)¶
Generate abstract code from equations. The method also gets the the variables because some state updaters have to check whether variable names reflect other state variables (which can change from timestep to timestep) or are external values (which stay constant during a run) For convenience, this arguments are optional – this allows to directly see what code a state updater generates for a set of equations by simply writing
euler(eqs), for example.
apply_stateupdater(equations, variables, method, method_options=None, group_name=None)¶
Applies a given state updater to equations. If a
methodis given, the state updater with the given name is used or if is a callable, then it is used directly. If a
methodis a list of names, all the methods will be tried until one that doesn’t raise an
Register a state updater. Registered state updaters can be referred to via their name.