pub struct NetworkBuilder { /* private fields */ }Expand description
Builder pattern for constructing networks.
Implementations§
Source§impl NetworkBuilder
impl NetworkBuilder
Sourcepub fn add_excitatory_population(
self,
id: impl Into<String>,
size: usize,
) -> Result<Self>
pub fn add_excitatory_population( self, id: impl Into<String>, size: usize, ) -> Result<Self>
Add an excitatory population.
Sourcepub fn add_inhibitory_population(
self,
id: impl Into<String>,
size: usize,
) -> Result<Self>
pub fn add_inhibitory_population( self, id: impl Into<String>, size: usize, ) -> Result<Self>
Add an inhibitory population.
Sourcepub fn add_population(self, population: NeuralPopulation) -> Self
pub fn add_population(self, population: NeuralPopulation) -> Self
Add a custom population.
Sourcepub fn connect(
self,
source_idx: usize,
target_idx: usize,
pattern: ConnectionPattern,
synapse_type: SynapseType,
weight: f64,
delay: f64,
) -> Result<Self>
pub fn connect( self, source_idx: usize, target_idx: usize, pattern: ConnectionPattern, synapse_type: SynapseType, weight: f64, delay: f64, ) -> Result<Self>
Connect two populations.
Sourcepub fn add_stimulation(
self,
pop_idx: usize,
stim: Box<dyn Stimulation>,
) -> Result<Self>
pub fn add_stimulation( self, pop_idx: usize, stim: Box<dyn Stimulation>, ) -> Result<Self>
Add stimulation to a population.
Sourcepub fn with_spike_recording(self) -> Self
pub fn with_spike_recording(self) -> Self
Enable spike recording.
Sourcepub fn with_voltage_recording(self) -> Self
pub fn with_voltage_recording(self) -> Self
Enable voltage recording.
Sourcepub fn with_rate_recording(self, window: f64) -> Self
pub fn with_rate_recording(self, window: f64) -> Self
Enable rate recording.
Auto Trait Implementations§
impl !RefUnwindSafe for NetworkBuilder
impl !Send for NetworkBuilder
impl !Sync for NetworkBuilder
impl !UnwindSafe for NetworkBuilder
impl Freeze for NetworkBuilder
impl Unpin for NetworkBuilder
impl UnsafeUnpin for NetworkBuilder
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.