MedianHeap
MedianHeap is a Rust crate that provides a data structure for calculating the median of a collection of values in constant time. It utilizes two binary heaps to store values efficiently and offers flexibility in calculating the median by allowing different strategies through user-defined traits.
Installation
Idk, I might publish this but for now just clone the repo :shrug:.
Usage
To use MedianHeap
, add this to your code:
use ;
;
Examples
If I don't feel lazy I might add some examples. It's a really simple library though. I have faith in you that you'll get it to work <3.
TODO
Here are some things I - might - still implement.
- Search/Get from the heap
- Pop/Delete from the heap
- Add some more utility
License
This project is licensed under the MIT License - see the LICENSE file for details.