capability-feature-measurement 0.1.0

A Rust crate providing a trait-based system for measuring and evaluating complexity, branching, density, and configuration of tree-like data structures.
Documentation
// ---------------- [ File: capability-feature-measurement/src/complexity.rs ]
crate::ix!();

/// ---------------------------------------------------------------------------
/// 11) Complexity
/// ---------------------------------------------------------------------------

/// If we want to guess or detect an overall "complexity" level from the structure
/// (e.g., `Simple`, `Balanced`, `Complex`), we can do so here.
pub trait TreeConfigurationComplexityMeasurer {
    fn measure_tree_configuration_complexity(&self) -> Option<DetectedTreeConfigurationComplexity>;
}

/// Potential result for a measured complexity. We might not know, so we have `Unknown`.
#[derive(Debug, Clone, PartialEq)]
pub enum DetectedTreeConfigurationComplexity {
    Simple,
    Balanced,
    Complex,
    Unknown,
    Linear,
    Star,
}