pub struct MihalasNieburNeuron {Show 18 fields
pub v: f64,
pub theta: f64,
pub i1: f64,
pub i2: f64,
pub v_rest: f64,
pub v_reset: f64,
pub theta_reset: f64,
pub theta_inf: f64,
pub leak_rate: f64,
pub threshold_voltage_coupling: f64,
pub threshold_decay_rate: f64,
pub current_decay_rate_1: f64,
pub current_decay_rate_2: f64,
pub current_retention_1: f64,
pub current_retention_2: f64,
pub current_jump_1: f64,
pub current_jump_2: f64,
pub dt: f64,
}Expand description
Four-state generalised integrate-and-fire neuron from Mihalaş and Niebur (2009).
Rates are per millisecond, voltages are volts, and currents are volts per millisecond after division by capacitance. The flow uses fixed-grid RK4 and sampled threshold detection; the published differential equations and event reset are otherwise unchanged.
Fields§
§v: f64§theta: f64§i1: f64§i2: f64§v_rest: f64§v_reset: f64§theta_reset: f64§theta_inf: f64§leak_rate: f64§threshold_voltage_coupling: f64§threshold_decay_rate: f64§current_decay_rate_1: f64§current_decay_rate_2: f64§current_retention_1: f64§current_retention_2: f64§current_jump_1: f64§current_jump_2: f64§dt: f64Implementations§
Source§impl MihalasNieburNeuron
impl MihalasNieburNeuron
fn finite(values: &[f64]) -> bool
fn valid(&self) -> bool
fn derivatives(&self, state: [f64; 4], current: f64) -> [f64; 4]
fn add_scaled(state: [f64; 4], slope: [f64; 4], scale: f64) -> [f64; 4]
fn candidate(&self, current: f64) -> Option<(Self, i32)>
Sourcepub fn try_step(&mut self, current: f64) -> Option<i32>
pub fn try_step(&mut self, current: f64) -> Option<i32>
Advance one sampled interval, returning None for an invalid candidate.
Sourcepub fn step(&mut self, current: f64) -> i32
pub fn step(&mut self, current: f64) -> i32
Advance one sampled interval and leave state unchanged on invalid input.
Trait Implementations§
Source§impl Clone for MihalasNieburNeuron
impl Clone for MihalasNieburNeuron
Source§impl Debug for MihalasNieburNeuron
impl Debug for MihalasNieburNeuron
Auto Trait Implementations§
impl Freeze for MihalasNieburNeuron
impl RefUnwindSafe for MihalasNieburNeuron
impl Send for MihalasNieburNeuron
impl Sync for MihalasNieburNeuron
impl Unpin for MihalasNieburNeuron
impl UnsafeUnpin for MihalasNieburNeuron
impl UnwindSafe for MihalasNieburNeuron
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.