Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index_of & index_range support #25

Open
ByteAlex opened this issue Sep 2, 2023 · 2 comments · May be fixed by #26
Open

index_of & index_range support #25

ByteAlex opened this issue Sep 2, 2023 · 2 comments · May be fixed by #26

Comments

@ByteAlex
Copy link

ByteAlex commented Sep 2, 2023

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

@JP-Ellis
Copy link
Owner

JP-Ellis commented Sep 2, 2023

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.

@ByteAlex
Copy link
Author

ByteAlex commented Sep 2, 2023

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?

@ByteAlex ByteAlex linked a pull request Sep 2, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants