pub struct NeuronPopulation {
pub neurons: Vec<LIFNeuron>,
pub spike_trains: Vec<SpikeTrain>,
pub time: SimTime,
}Expand description
Population of LIF neurons
Fields§
§neurons: Vec<LIFNeuron>All neurons in the population
spike_trains: Vec<SpikeTrain>Spike trains for each neuron
time: SimTimeCurrent simulation time
Implementations§
Source§impl NeuronPopulation
impl NeuronPopulation
Sourcepub fn with_config(n: usize, config: NeuronConfig) -> Self
pub fn with_config(n: usize, config: NeuronConfig) -> Self
Create population with custom configuration
Sourcepub fn step(&mut self, currents: &[f64], dt: f64) -> Vec<Spike>
pub fn step(&mut self, currents: &[f64], dt: f64) -> Vec<Spike>
Step all neurons with given currents
Uses parallel processing for large populations (>200 neurons).
Sourcepub fn population_rate(&self, window: f64) -> f64
pub fn population_rate(&self, window: f64) -> f64
Get population spike rate
Trait Implementations§
Source§impl Clone for NeuronPopulation
impl Clone for NeuronPopulation
Source§fn clone(&self) -> NeuronPopulation
fn clone(&self) -> NeuronPopulation
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 NeuronPopulation
impl RefUnwindSafe for NeuronPopulation
impl Send for NeuronPopulation
impl Sync for NeuronPopulation
impl Unpin for NeuronPopulation
impl UnwindSafe for NeuronPopulation
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