Age | Commit message (Collapse) | Author |
|
I did a bit of Profiling and made the quickselect and median algorithms
use the best of option for the respective input size.
|
|
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`
|
|
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.
|
|
|
|
|
|
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.
|