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

Weak heap based priority queue? #11

Open
eaglgenes101 opened this issue Dec 31, 2020 · 2 comments
Open

Weak heap based priority queue? #11

eaglgenes101 opened this issue Dec 31, 2020 · 2 comments

Comments

@eaglgenes101
Copy link

Weak heaps have more favorable time complexities than binary heaps and do fewer comparisons than them.

I modified my own copy of this crate to be able to use a weak heap as a backend instead of a binary heap, and benchmarking seems to show that they do live up to the theory. However, weak heaps have more overhead than binary heaps, so binary heaps will still be preferred in some applications.

Would this be an addition to this crate you would be willing to accept, and if so, how should I integrate it with the rest of the crate?

@AngelicosPhosphoros
Copy link
Owner

@eaglgenes101 Hi, thank for information!

Can you send me link to your modification?
I am currently without internet but I would be able to look into in next week.

@eaglgenes101
Copy link
Author

https://github.com/eaglgenes101/keyed_priority_queue

Do note, however, that these changes were made largely for exploration purposes, and IMO are not suited for merging yet. We can probably think of a better API design than what I threw together...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants