Function detect_period

Source
fn detect_period(occurrences: &[MotifOccurrence]) -> Option<usize>
Expand description

Detect periodicity from occurrence indices.

If gaps between consecutive occurrences are within 20% of the median gap, returns the median gap as the period. Otherwise returns None.