-
Notifications
You must be signed in to change notification settings - Fork 52
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
skip and mix methods in Random typeclass? #39
Comments
Indeed! Have you looked at the pcg random? Also the chacha csprng / stream cipher has a similar thing. On Tuesday, May 10, 2016, Zemyla notifications@github.com wrote:
|
@Zemyla do you have any particular PRNGs in mind (ideally already existing in Haskell ecosystem)? Since |
idontgetoutmuch#7 is closely related in the sense that Introducing an extra class for There are probably nice ways to model PRNGs better such that only those which implement I think it wouldn't hurt to brainstorm what an API with explicit PRNG "features" like |
I think any PRNG with a fast (O(log n)) |
Those sound like reasonable approaches to me, but the However, my understanding of this issue was that it was about exposing an API for |
There are RNGs that can skip n values in less than O(n) time, and they should have the opportunity to expose this to the user. And the ones that don't still have a sensible default:
There are also RNGs that allow the user to mix in entropy to the generator, and this also has a sensible default for generators without that operation:
These methods should be part of the typeclass so they can be available to both consumers of random numbers and those who want to create generators that modify other generators.
The text was updated successfully, but these errors were encountered: