Skip to main content

py_mckean_simulate

Function py_mckean_simulate 

Source
pub(crate) fn py_mckean_simulate<'py>(
    py: Python<'py>,
    v0: f64,
    w0: f64,
    a: f64,
    epsilon: f64,
    gamma: f64,
    dt: f64,
    v_peak: f64,
    n_steps: usize,
    current: f64,
) -> (Bound<'py, PyArray1<f64>>, i64, f64, f64)
Expand description

N-step McKean (1970) piecewise-linear FitzHugh-Nagumo caricature simulation.

Parity contract with sc_neurocore.neurons.models.mckean.McKeanNeuron.simulate: for the same parameters and constant input the returned v trace, upward-v_peak-crossing spike count, and final (v, w) state are bit-identical to the Python RK4 reference (the piecewise-linear right-hand side is exact arithmetic — additions, multiplications and branch selection, no transcendental functions — and a two-dimensional autonomous flow cannot be chaotic).