std_dev

Module percentile

source
Expand description

Percentile / median calculations.

  • O(n log n) naive_percentile (simple to understand)
  • probabilistic O(n) percentile (recommended, fastest, and also quite simple to understand)
  • deterministic O(n) median_of_medians (harder to understand, probably slower than the probabilistic version. However guarantees linear time, so useful in critical applications.)

You should probably use percentile_rand.

The linear time algoritms are implementations following this blogpost.

Modules§

Structs§

Enums§

  • The result of a percentile (e.g. median) lookup.

Traits§

Functions§