pub enum ConnectionModel {
Uniform {
p: f32,
},
DistanceDependent {
p_max: f32,
lambda: f32,
},
SmallWorld {
k: usize,
beta: f32,
},
ScaleFree {
m0: usize,
m: usize,
},
Layered {
layer_sizes: Vec<usize>,
inter_layer_p: f32,
},
}Expand description
Strategy for determining connection probability between neuron pairs.
Variants§
Uniform
Erdős–Rényi: each pair connected independently with probability p.
DistanceDependent
Distance-dependent: probability decays with Euclidean distance.
p(d) = p_max × exp(−d / lambda).
SmallWorld
Watts–Strogatz small-world: each neuron has k outgoing directed
synapses to its nearest ring neighbours (k/2 clockwise, k/2
counterclockwise). k must be even. Each outgoing synapse is then
rewired with probability beta to a different non-self target when
one is available (a dense ring k = n - 1 has none).
ScaleFree
Barabási–Albert preferential attachment: start with m0 nodes that
are fully connected in both directions (m0 * (m0 - 1) directed
synapses). Each new node attaches to exactly m distinct older
nodes, and each attachment is stored as a reciprocal directed pair.
Layered
Feed-forward layered: neurons arranged in layers, each layer fully connected to the next with given probability.
Trait Implementations§
Source§impl Clone for ConnectionModel
impl Clone for ConnectionModel
Source§fn clone(&self) -> ConnectionModel
fn clone(&self) -> ConnectionModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more