Skip to main content

AlphaNeuron

Struct AlphaNeuron 

Source
pub struct AlphaNeuron {
    pub v: f64,
    pub a_exc: f64,
    pub i_exc: f64,
    pub a_inh: f64,
    pub i_inh: f64,
    pub v_rest: f64,
    pub v_threshold: f64,
    pub tau_v: f64,
    pub tau_exc: f64,
    pub tau_inh: f64,
    pub dt: f64,
}
Expand description

Dual excitatory/inhibitory alpha-synapse leaky integrate-and-fire neuron.

Fields§

§v: f64

Membrane potential.

§a_exc: f64

Excitatory alpha-rise state.

§i_exc: f64

Excitatory synaptic current.

§a_inh: f64

Inhibitory alpha-rise state.

§i_inh: f64

Inhibitory synaptic current.

§v_rest: f64

Leak reversal potential, also the somatic spike reset.

§v_threshold: f64

Spike threshold; must exceed v_rest.

§tau_v: f64

Positive membrane time constant.

§tau_exc: f64

Positive excitatory alpha time constant.

§tau_inh: f64

Positive inhibitory alpha time constant.

§dt: f64

Positive piecewise-constant-input sampling interval.

Implementations§

Source§

impl AlphaNeuron

Source

pub fn new() -> Self

Construct the catalogue model-family defaults.

Source

pub fn with_parameters( v: f64, a_exc: f64, i_exc: f64, a_inh: f64, i_inh: f64, v_rest: f64, v_threshold: f64, tau_v: f64, tau_exc: f64, tau_inh: f64, dt: f64, ) -> Result<Self, AlphaError>

Construct and validate a complete numerical configuration.

Source

fn validate(&self) -> Result<(), AlphaError>

Source

fn filter_candidates( rise_state: f64, current_state: f64, drive: f64, tau: f64, dt: f64, decay: f64, ) -> Result<(f64, f64), AlphaError>

Source

fn drive_contribution( current_delta: f64, rise_delta: f64, tau_drive: f64, dt: f64, rates: [f64; 2], decays: [f64; 2], ) -> Result<f64, AlphaError>

Source

pub fn try_step( &mut self, exc_current: f64, inh_current: f64, ) -> Result<i32, AlphaError>

Advance one exact-flow interval with explicit error reporting.

Source

pub fn step(&mut self, exc_current: f64, inh_current: f64) -> i32

Preserve the legacy scalar API while failing closed on invalid input.

Source

pub fn reset(&mut self)

Restore the documented rest state while preserving configuration.

Trait Implementations§

Source§

impl Clone for AlphaNeuron

Source§

fn clone(&self) -> AlphaNeuron

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AlphaNeuron

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AlphaNeuron

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T, A> IntoAst<A> for T
where T: Into<A>, A: Ast,

§

fn into_ast(self, _a: &A) -> A

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Ungil for T
where T: Send,

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V