pub struct MainenSejnowskiNeuron {}Expand description
Mainen-Sejnowski — two-compartment (soma + axon). Mainen & Sejnowski 1996.
Fields§
§vs: f64§va: f64§m: f64§h: f64§n: f64§kappa: f64§g_na: f64§g_k: f64§g_l: f64§e_na: f64§e_k: f64§e_l: f64§c_s: f64§c_a: f64§dt: f64§v_threshold: f64§legacy_sequential: boolLegacy engine configuration: update the soma voltage first and let the axon derivative consume the already-updated soma value (Gauss-Seidel ordering). The canonical reference uses the Python Jacobi ordering (both derivatives from pre-update values).
Implementations§
Source§impl MainenSejnowskiNeuron
impl MainenSejnowskiNeuron
pub fn new() -> Self
Sourcepub fn new_legacy_sequential() -> Self
pub fn new_legacy_sequential() -> Self
Reconstruct the original engine ordering (soma committed before the axon derivative is evaluated). This is a legacy configuration of the same model, not a separate catalogue identity.
fn valid(&self) -> bool
Sourcefn linoid(x: f64, k: f64) -> f64
fn linoid(x: f64, k: f64) -> f64
Evaluate x / (1 - exp(-x / k)) with its analytic limit k at 0.
Sourcepub fn try_step(&mut self, current: f64) -> Result<i32, &'static str>
pub fn try_step(&mut self, current: f64) -> Result<i32, &'static str>
Advance one step after validating the drive and configuration.
Computes the whole update on a candidate clone and commits only on
success: a non-finite current, a configuration outside the public
bounds, or a non-finite candidate returns Err with the pre-step
state preserved exactly.
Sourcefn canonical_substep(candidate: &mut Self, current: f64)
fn canonical_substep(candidate: &mut Self, current: f64)
Canonical reference sub-step: Jacobi compartment ordering with analytically exact removable-singularity rate limits.
Sourcefn legacy_sequential_substep(candidate: &mut Self, current: f64)
fn legacy_sequential_substep(candidate: &mut Self, current: f64)
Legacy engine sub-step preserved verbatim: Gauss-Seidel ordering
(the axon derivative consumes the already-updated soma voltage) with
the original |x| < 1e-6 analytic-limit branches and additive 1e-12
regularisation elsewhere.
Trait Implementations§
Source§impl Clone for MainenSejnowskiNeuron
impl Clone for MainenSejnowskiNeuron
Source§impl Debug for MainenSejnowskiNeuron
impl Debug for MainenSejnowskiNeuron
Auto Trait Implementations§
impl Freeze for MainenSejnowskiNeuron
impl RefUnwindSafe for MainenSejnowskiNeuron
impl Send for MainenSejnowskiNeuron
impl Sync for MainenSejnowskiNeuron
impl Unpin for MainenSejnowskiNeuron
impl UnsafeUnpin for MainenSejnowskiNeuron
impl UnwindSafe for MainenSejnowskiNeuron
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.