SynapticNetwork

Struct SynapticNetwork 

Source
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: usize

Number of neurons in the network.

§connections: Vec<Connection>

Chemical synaptic connections.

§gap_junctions: Vec<GapJunction>

Gap junctions.

§ephaptic_couplings: Vec<EphapticCoupling>

Ephaptic couplings.

§neuromodulators: NeuromodulatorState

Neuromodulator state.

Implementations§

Source§

impl SynapticNetwork

Source

pub fn new(n_neurons: usize) -> Self

Create a new synaptic network.

§Arguments
  • n_neurons - Number of neurons in the network
Source

pub fn add_connection( &mut self, pre: usize, post: usize, synapse: Synapse, ) -> Result<()>

Add a chemical synapse connection.

Source

pub fn add_gap_junction( &mut self, neuron1: usize, neuron2: usize, conductance: f64, ) -> Result<()>

Add a gap junction.

Source

pub fn add_ephaptic_coupling( &mut self, source: usize, target: usize, distance: f64, ) -> Result<()>

Add ephaptic coupling.

Source

pub fn spike(&mut self, neuron_id: usize) -> Result<()>

Process spike from a neuron.

§Arguments
  • neuron_id - ID of spiking neuron
Source

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)
Source

pub fn get_synaptic_current(&self, neuron_id: usize) -> Result<f64>

Get synaptic current to a neuron.

§Arguments
  • neuron_id - Target neuron ID
§Returns

Total synaptic current (pA)

Source

pub fn get_inputs(&self, neuron_id: usize) -> Vec<&Connection>

Get all synaptic connections to a neuron.

Source

pub fn get_outputs(&self, neuron_id: usize) -> Vec<&Connection>

Get all synaptic connections from a neuron.

Source

pub fn connectivity_stats(&self) -> NetworkStats

Get connectivity statistics.

Source

pub fn reset(&mut self)

Reset all synapses in the network.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.