summaryrefslogtreecommitdiff
path: root/AK/Statistics.h
AgeCommit message (Collapse)Author
2023-02-03AK: Add thresholds to `quickselect_inline` and `Statistics::Median`Staubfinger
I did a bit of Profiling and made the quickselect and median algorithms use the best of option for the respective input size.
2023-02-03AK: Use `AK:quickselect_inline` to compute `AK::Statistics::median`Staubfinger
Quick select is an algorithm that is able to find the median of a Vector without fully sorting it. This replaces the old very naive implementation for `AK::Statistics::median()` with `AK::quickselect_inline`
2023-01-07AK: Make `Statistics::median` return a mean for an even number of valuesStaubfinger
The previous implementation of Statistics::median() was slightly incorrect with an even number of elements since in those cases it needs to be the arithmetic mean of the two elements that share the middle position.
2022-12-09Everywhere: Use C++ concepts instead of requires clausesMoustafa Raafat
2021-11-06AK: Add min and max functions to StatisticsMusab Kılıç
2021-08-31AK: Add Statistics helperTobias Christiansen
This patch adds a helper to AK which allows for basic statistical analysis of values. The median algorithm is very naive and slow, but it works.