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

Batch-changing priorities #7

Closed
Yoric opened this issue May 11, 2018 · 1 comment
Closed

Batch-changing priorities #7

Yoric opened this issue May 11, 2018 · 1 comment
Assignees

Comments

@Yoric
Copy link

Yoric commented May 11, 2018

I find myself in a use case in which I need to change many (possibly all) priorities at once. So, maybe a

fn change_all_priorities<F>(&mut self, priority_setter: F) where F: FnMut(&I, P) -> P {
   ...
}
@garro95 garro95 self-assigned this May 12, 2018
@garro95
Copy link
Owner

garro95 commented May 13, 2018

I think it would be good to implement a mutable iterator, such that one can modify Priorities and also Items in a way that don't affect the result of hash and eq. My idea is that, when the iterator goes out of scope, the heap can be rebuilt, exploiting the effect of the Drop trait.

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

No branches or pull requests

2 participants