-
Notifications
You must be signed in to change notification settings - Fork 2
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
Consider adding {push_pop, replace}
methods
#10
Comments
If nobody's working on this already, I'll try to prepare a PR. |
Go for it! On Saturday, March 21, 2015, sellibitze notifications@github.com wrote:
|
My only concern is the lack of a concrete usecase for this methods. In particular:
|
The reason why I wrote this lib was to have a priority queue that I could limit in size. I was interested in computing an approximation to a shortest-path problem. In this case, you'd pop the smallest items off the queue to expand the set of visited nodes and pop the largest items off the queue to limit its size. So, depending on its size, you could either do But I don't know if providing @gankro: In your 2nd bullet point you seem to be concerned about |
BinaryHeap
has these optimized methods (push_pop
,replace
). We would need variants for min and max.The text was updated successfully, but these errors were encountered: