pub fn count_inversions_f64(data: &[f64]) -> u64
Count the number of inversions (pairs where data[i] > data[j] for i < j).
data[i]
data[j]
Uses a simple O(n log n) merge-sort-based inversion count.