pub struct SynapticNetwork {
pub n_neurons: usize,
pub connections: Vec<Connection>,
pub gap_junctions: Vec<GapJunction>,
pub ephaptic_couplings: Vec<EphapticCoupling>,
pub neuromodulators: NeuromodulatorState,
/* private fields */
}Expand description
Synaptic network.
Manages a network of neurons connected by synapses.
Fields§
§n_neurons: usizeNumber of neurons in the network.
connections: Vec<Connection>Chemical synaptic connections.
gap_junctions: Vec<GapJunction>Gap junctions.
ephaptic_couplings: Vec<EphapticCoupling>Ephaptic couplings.
neuromodulators: NeuromodulatorStateNeuromodulator state.
Implementations§
Source§impl SynapticNetwork
impl SynapticNetwork
Sourcepub fn add_connection(
&mut self,
pre: usize,
post: usize,
synapse: Synapse,
) -> Result<()>
pub fn add_connection( &mut self, pre: usize, post: usize, synapse: Synapse, ) -> Result<()>
Add a chemical synapse connection.
Sourcepub fn add_gap_junction(
&mut self,
neuron1: usize,
neuron2: usize,
conductance: f64,
) -> Result<()>
pub fn add_gap_junction( &mut self, neuron1: usize, neuron2: usize, conductance: f64, ) -> Result<()>
Add a gap junction.
Sourcepub fn add_ephaptic_coupling(
&mut self,
source: usize,
target: usize,
distance: f64,
) -> Result<()>
pub fn add_ephaptic_coupling( &mut self, source: usize, target: usize, distance: f64, ) -> Result<()>
Add ephaptic coupling.
Sourcepub fn update(&mut self, neuron_voltages: &[f64], dt: f64) -> Result<()>
pub fn update(&mut self, neuron_voltages: &[f64], dt: f64) -> Result<()>
Update network dynamics.
§Arguments
neuron_voltages- Current voltage of each neuron (mV)dt- Time step (ms)
Sourcepub fn get_synaptic_current(&self, neuron_id: usize) -> Result<f64>
pub fn get_synaptic_current(&self, neuron_id: usize) -> Result<f64>
Sourcepub fn get_inputs(&self, neuron_id: usize) -> Vec<&Connection>
pub fn get_inputs(&self, neuron_id: usize) -> Vec<&Connection>
Get all synaptic connections to a neuron.
Sourcepub fn get_outputs(&self, neuron_id: usize) -> Vec<&Connection>
pub fn get_outputs(&self, neuron_id: usize) -> Vec<&Connection>
Get all synaptic connections from a neuron.
Sourcepub fn connectivity_stats(&self) -> NetworkStats
pub fn connectivity_stats(&self) -> NetworkStats
Get connectivity statistics.
Auto Trait Implementations§
impl Freeze for SynapticNetwork
impl RefUnwindSafe for SynapticNetwork
impl Send for SynapticNetwork
impl Sync for SynapticNetwork
impl Unpin for SynapticNetwork
impl UnwindSafe for SynapticNetwork
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