-
Notifications
You must be signed in to change notification settings - Fork 432
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
Add example for initializing a PCG RNG #1352
Conversation
@kornelski Does this address your concerns? |
Some tests fail:
Not sure what the best fix is. We could use |
Yes, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error[E0432]: unresolved import
rand
Indeed, this makes examples in RNG crates a pain.
For this RNG I think we should mention seed_from_u64
anyway since its main use-cases probably involve reproducible seeding. We can include a comment like:
let mut rng = Pcg64Mcg::seed_from_u64(0);
// Alternative: Pcg64Mcg::from_entropy();
I think it can be fixed by adding |
@newpavlov Would you prefer this to the current solution ( |
I am fine with either, but the docs probably should mention that the crate functionality is implemented using traits from the |
@newpavlov I added an example for using rand (adding it as a dev dependency). |
No description provided.