pub fn average_maturity_level(scores: &[u8]) -> Option<f64>Expand description
The arithmetic mean across a set of per-dimension maturity levels — the
more flattering composite the chapter explicitly warns against using as
the overall score. Kept here so callers can compute it alongside
minimum_maturity_level and see the gap between the two.
§Arguments
scores— one maturity level per dimension assessed.
§Returns
The mean level as an f64, or None if scores is empty.
§Examples
use software_engineering::maturity_model::average_maturity_level;
let average = average_maturity_level(&[4, 4, 4, 1, 4]).unwrap();
assert!((average - 3.4).abs() < 1e-9);
assert_eq!(average_maturity_level(&[]), None);