#[derive(Debug, Clone, PartialEq)]
#[non_exhaustive]
pub struct NetworkStats {
pub total_spikes: u64,
#[cfg(feature = "unstable-stdp")]
pub plasticity_events: u64,
#[cfg(feature = "unstable-stdp")]
pub stdp_pairs_same_step: u64,
#[cfg(feature = "unstable-stdp")]
pub stdp_pairs_post_leads: u64,
#[cfg(feature = "unstable-stdp")]
pub stdp_pairs_pre_leads: u64,
pub avg_membrane_potential_mv: f64,
pub firing_rate_hz: f64,
}
impl NetworkStats {
pub(crate) fn new() -> Self {
Self {
total_spikes: 0,
#[cfg(feature = "unstable-stdp")]
plasticity_events: 0,
#[cfg(feature = "unstable-stdp")]
stdp_pairs_same_step: 0,
#[cfg(feature = "unstable-stdp")]
stdp_pairs_post_leads: 0,
#[cfg(feature = "unstable-stdp")]
stdp_pairs_pre_leads: 0,
avg_membrane_potential_mv: -70.0,
firing_rate_hz: 0.0,
}
}
}