1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! # neuromod — Spiking neural network primitives
//!
//! Biologically grounded SNN building blocks for Rust: a topology-neutral
//! [`SpikingNetwork`] engine (LIF + Izhikevich banks), generic neuromodulators,
//! classical STDP helpers, and reward-modulated STDP types.
//!
//! ## Engine vs standalone models
//!
//! - **`SpikingNetwork`** wires **LIF** and **Izhikevich** neuron banks only
//! (`with_dimensions(num_lif, num_izh, num_channels)`).
//! - **Standalone** types (`LapicqueNeuron`, `GifNeuron`, `FitzHughNagumoNeuron`,
//! `HodgkinHuxleyNeuron`, …) are usable on their own; they are not alternate
//! engine banks.
//! - Plasticity: classical Hebbian STDP utilities plus `EligibilityTrace` /
//! `RmStdpConfig` building blocks (see crate docs and examples for current
//! integration status).
//!
//! ## Features
//!
//! - Topology-neutral, dynamically sized `SpikingNetwork`
//! - Neuromodulators: dopamine, serotonin, acetylcholine, norepinephrine
//! - Optional `sentry` feature (off by default) for application-level reporting
//!
//! ```rust
//! use neuromod::{NeuroModulators, SpikingNetwork};
//!
//! let mut network = SpikingNetwork::new();
//! let stimuli = [0.5f32; 16];
//! let modulators = NeuroModulators::default();
//! let output = network.step(&stimuli, &modulators).unwrap();
//! println!("Neurons that fired: {output:?}");
//!
//! // Or build dynamically for larger architectures.
//! let mut large = SpikingNetwork::with_dimensions(518, 5, 518);
//! let large_input = vec![0.25f32; 518];
//! let _ = large.step(&large_input, &modulators).unwrap();
//! ```
pub use ;
pub use FitzHughNagumoNeuron;
pub use GifNeuron;
pub use ;
pub use HodgkinHuxleyNeuron;
pub use IzhikevichNeuron;
pub use LapicqueNeuron;
pub use LifNeuron;
pub use ;
pub use ;
/// Number of input channels supported by default.
pub const NUM_INPUT_CHANNELS: usize = 16;