Skip to main content

aggregate_entropy

Function aggregate_entropy 

Source
pub fn aggregate_entropy<'a>(
    items: impl Iterator<Item = (&'a EntropyAnalysis, usize)>,
) -> Option<EntropyAnalysis>
Expand description

Aggregate entropy analysis from multiple functions.

Uses length-weighted averaging for entropy values and sums for complexity values. This is the SINGLE aggregation function for all entropy aggregation needs.

§Arguments

  • items - Iterator of (EntropyAnalysis reference, function_length) tuples

§Returns

Aggregated EntropyAnalysis, or None if input is empty or total length is 0.