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
//! Spiking Neural Networks with online e-prop learning.
//!
//! This module provides LIF (Leaky Integrate-and-Fire) neurons with integer
//! arithmetic (Q1.14 fixed-point), delta spike encoding, and the e-prop
//! three-factor learning rule for online training.
//!
//! # Architecture
//!
//! The SNN processes streaming data through three stages:
//!
//! 1. **Delta encoding** -- raw features are converted to spike trains via
//! temporal differencing (UP/DOWN spike pairs per feature)
//! 2. **Recurrent spiking layer** -- LIF neurons with e-prop eligibility
//! traces and feedback alignment for weight updates
//! 3. **Readout** -- non-spiking leaky integrators whose membrane potentials
//! serve as continuous output predictions
//!
//! # Fixed-Point Arithmetic
//!
//! All neuron computations use Q1.14 fixed-point (i16 where 16384 = 1.0).
//! Multiply-accumulate operations use i32 intermediates to prevent overflow.
//! This enables deployment on integer-only hardware (Cortex-M0+, RISC-V).
//!
//! # Components
//!
//! - [`lif`] -- LIF neuron step and surrogate gradient functions
//! - [`spike_encoding`] -- Delta spike encoder for continuous-to-spike conversion
//! - [`eprop`] -- e-prop three-factor learning rule functions
//! - [`readout`] -- Non-spiking leaky integrator readout neuron
//! - [`network_fixed`] -- Complete SNN combining all components
pub use ;
pub use ;
pub use ;
pub use ReadoutNeuron;
pub use DeltaEncoderFixed;