/*
    Appellation: statistics <module>
    Contrib: @FL03
*/
use std::collections::HashMap;

/// Statistics about the memory system
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(
    feature = "serde",
    derive(serde_derive::Deserialize, serde_derive::Serialize)
)]
pub struct MemoryStatistics {
    /// Total number of features (including dead ones)
    pub total_features: usize,
    /// Number of active features
    pub active_features: usize,
    /// Count of features by dimension
    pub feature_counts_by_dimension: HashMap<usize, usize>,
    /// Average importance by dimension
    pub avg_importance_by_dimension: HashMap<usize, f32>,
    /// Total number of relationships
    pub relationship_count: usize,
    /// Total number of patterns
    pub pattern_count: usize,
    /// Most common patterns (sequence, frequency)
    pub most_common_patterns: Vec<(Vec<usize>, usize)>,
    /// Current memory time
    pub memory_time: usize,
}
