neuromod 0.5.0

A high-performance Rust SNN library for neuroscience research and pure spiking neural network library featuring LIF, Izhikevich, Hebbian, Nagumo, Lapicque and Hodgkin-Huxley dynamics.
Documentation
//! Basic example of using the neuromod library
use neuromod::{NeuroModulators, SpikingNetwork};

fn main() {
    println!("=== Neuromod Basic Example ===");

    let mut network = SpikingNetwork::new();
    println!(
        "✓ Created spiking network with {} neurons",
        network.neurons.len()
    );

    let stimuli = [
        0.5, 0.3, 0.8, 0.2, 0.1, 0.9, 0.4, 0.7, 0.6, 0.2, 0.8, 0.3, 0.5, 0.1, 0.9, 0.4,
    ];

    println!("✓ Created input stimuli: {:?}", stimuli);

    let modulators = NeuroModulators::default();
    println!(
        "✓ Created neuromodulators: dopamine={:.2}, serotonin={:.2}, ach={:.2}, ne={:.2}",
        modulators.dopamine,
        modulators.serotonin,
        modulators.acetylcholine,
        modulators.norepinephrine
    );

    let spikes = network
        .step(&stimuli, &modulators)
        .expect("stimuli length must match network channels");
    println!("✓ Network step completed");
    println!("  Neurons that spiked: {:?}", spikes);

    let potentials = network.get_membrane_potentials();
    println!(
        "  Membrane potentials: {:?}",
        potentials.iter().take(8).collect::<Vec<_>>()
    );

    let thresholds = network.get_thresholds();
    println!(
        "  Thresholds: {:?}",
        thresholds.iter().take(8).collect::<Vec<_>>()
    );

    println!("✓ Example completed successfully!");
}