garro95 / priority-queue

A priority queue for Rust with efficient change function.
173 stars 29 forks source link

Add push_increase method #19

Closed lnicola closed 4 years ago

lnicola commented 4 years ago

Closes #18.

EDIT: Maybe the API here (cloning the priority and not replacing the item) is suboptimal?

garro95 commented 4 years ago

I will do some minor refactoring to keep the API consistent and merge this. Thank you

lnicola commented 4 years ago

Thanks for merging. It's a bit unfortunate that the new versions do the lookup twice, but that can be fixed later, I suppose.

garro95 commented 4 years ago

Yes, the lookup in the hashtable is done twice.