pub struct Network {
pub spike_recorder: Option<SpikeRecorder>,
pub voltage_recorder: Option<VoltageRecorder>,
pub rate_recorder: Option<PopulationRateRecorder>,
/* private fields */
}Expand description
Neural network with multiple populations and projections.
Fields§
§spike_recorder: Option<SpikeRecorder>Recorders
voltage_recorder: Option<VoltageRecorder>§rate_recorder: Option<PopulationRateRecorder>Implementations§
Source§impl Network
impl Network
Sourcepub fn add_population(&mut self, population: NeuralPopulation) -> usize
pub fn add_population(&mut self, population: NeuralPopulation) -> usize
Add a population to the network.
Sourcepub fn add_projection(&mut self, projection: Projection) -> usize
pub fn add_projection(&mut self, projection: Projection) -> usize
Add a projection between populations.
Sourcepub fn add_stimulation(
&mut self,
pop_idx: usize,
stim: Box<dyn Stimulation>,
) -> Result<()>
pub fn add_stimulation( &mut self, pop_idx: usize, stim: Box<dyn Stimulation>, ) -> Result<()>
Add external stimulation to a population.
Sourcepub fn enable_spike_recording(&mut self)
pub fn enable_spike_recording(&mut self)
Enable spike recording.
Sourcepub fn enable_voltage_recording(&mut self)
pub fn enable_voltage_recording(&mut self)
Enable voltage recording.
Sourcepub fn enable_rate_recording(&mut self, window: f64)
pub fn enable_rate_recording(&mut self, window: f64)
Enable population rate recording.
Sourcepub fn get_population(&self, idx: usize) -> Result<&NeuralPopulation>
pub fn get_population(&self, idx: usize) -> Result<&NeuralPopulation>
Get a population by index.
Sourcepub fn get_population_mut(
&mut self,
idx: usize,
) -> Result<&mut NeuralPopulation>
pub fn get_population_mut( &mut self, idx: usize, ) -> Result<&mut NeuralPopulation>
Get a mutable population by index.
Sourcepub fn current_time(&self) -> f64
pub fn current_time(&self) -> f64
Get current simulation time.
Sourcepub fn num_populations(&self) -> usize
pub fn num_populations(&self) -> usize
Get number of populations.
Sourcepub fn num_projections(&self) -> usize
pub fn num_projections(&self) -> usize
Get number of projections.
Sourcepub fn statistics(&self) -> NetworkStats
pub fn statistics(&self) -> NetworkStats
Get network statistics.
Auto Trait Implementations§
impl !RefUnwindSafe for Network
impl !UnwindSafe for Network
impl Freeze for Network
impl Send for Network
impl Sync for Network
impl Unpin for Network
impl UnsafeUnpin for Network
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> 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.