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

Did WeightedChoice went through the redesign mentioned in the 0.5.5 doc? #605

Closed
bbigras opened this issue Sep 10, 2018 · 2 comments
Closed

Comments

@bbigras
Copy link

bbigras commented Sep 10, 2018

I saw this warning a while ago and I had a recurring reminder to check from time to time to know when it would be safe to use WeightedChoice. It seems master doesn't have this warning so I was wondering if it's fixed.

There is also distributions::WeightedChoice, which can be used to pick elements at random with some probability. But it does not work well at the moment and is going through a redesign.

https://docs.rs/rand/0.5.5/rand/#more-functionality

@dhardy
Copy link
Member

dhardy commented Sep 10, 2018

The "doesn't work well" comment is about the API being difficult to work with; it's not buggy (as far as I know).

0.6 will have a different distribution: WeightedIndex, except that per #601 there might be yet another redesign.

Does that answer your question?

@bbigras
Copy link
Author

bbigras commented Sep 10, 2018

Yes thank you.

@bbigras bbigras closed this as completed Sep 10, 2018
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