JP-Ellis/rust-skiplist

index_of & index_range support

Opened this issue · 2 comments

Hello!

I've been on the hunt for a robust skip list implementation in Rust that supports index_of and index_range methods. I stumbled upon this library and was quite impressed with its performance. However, I noticed that it currently doesn't support these particular methods.

I would be more than happy to contribute these features myself via a PR. If someone could point me in the right direction for where in the codebase these features would best fit, I'd greatly appreciate it.

Thank you & Best Regards
Alex

I developed this a while ago, and I do want to get back into developing it some more and especially aligning methods with the standard library. I would very much welcome your contribution! These methods would be implemented in the main trait section:

impl<T> SkipList<T> {

and there's a similar spot for the skipmap.

If there's a new internal function you think is needed, feel free to create new private methods.

Last but certainly not least, make sure to document the public function, and add unit tests to make sure it is behaving correctly now and into the future 😁

Let me know if that's enough for you to get started, and if not, I would be happy to help out some more.

Cool stuff. I've cloned into the repo and started working on it.
I'm wondering what's the difference between a SkipList and an OrderedSkipList? Isn't a skip list ordered by design?
I found a range(usize, usize) method on the SkipList, but the OrderedSkipList has a range(&T, &T) signature. I'm wondering if I'm understanding this right?