pub struct AdaptiveSpikingNeuron { /* private fields */ }Expand description
Adaptive spiking neuron with homeostatic mechanisms
This neuron extends the basic spiking neuron with adaptive threshold and learning rate mechanisms to maintain stable firing rates.
Implementations§
Source§impl AdaptiveSpikingNeuron
impl AdaptiveSpikingNeuron
Sourcepub fn new(position: Vec<f64>, target_firing_rate: f64) -> Self
pub fn new(position: Vec<f64>, target_firing_rate: f64) -> Self
Create new adaptive spiking neuron
§Arguments
position- Spatial position of the neurontarget_firing_rate- Target firing rate for homeostasis
Sourcepub fn base_neuron(&self) -> &SpikingNeuron
pub fn base_neuron(&self) -> &SpikingNeuron
Get reference to base neuron
Sourcepub fn base_neuron_mut(&mut self) -> &mut SpikingNeuron
pub fn base_neuron_mut(&mut self) -> &mut SpikingNeuron
Get mutable reference to base neuron
Sourcepub fn target_firing_rate(&self) -> f64
pub fn target_firing_rate(&self) -> f64
Get target firing rate
Sourcepub fn set_target_firing_rate(&mut self, rate: f64)
pub fn set_target_firing_rate(&mut self, rate: f64)
Set target firing rate
Sourcepub fn recent_firing_rate(&self) -> f64
pub fn recent_firing_rate(&self) -> f64
Get recent firing rate
Sourcepub fn spike_count(&self) -> usize
pub fn spike_count(&self) -> usize
Get current spike count
Sourcepub fn reset_adaptation(&mut self)
pub fn reset_adaptation(&mut self)
Reset adaptation state
Trait Implementations§
Source§impl Clone for AdaptiveSpikingNeuron
impl Clone for AdaptiveSpikingNeuron
Source§fn clone(&self) -> AdaptiveSpikingNeuron
fn clone(&self) -> AdaptiveSpikingNeuron
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdaptiveSpikingNeuron
impl RefUnwindSafe for AdaptiveSpikingNeuron
impl Send for AdaptiveSpikingNeuron
impl Sync for AdaptiveSpikingNeuron
impl Unpin for AdaptiveSpikingNeuron
impl UnwindSafe for AdaptiveSpikingNeuron
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.