-
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
StepRng #268
StepRng #268
Conversation
Great! Surprising the resulting line count is only 10 less. What do you think about moving it inside the |
Why not just |
It could be moved to the @clarcharr the first time I tried introducing this I got criticized for not making it very clear from the name that it was not a real random number generator, though I guess |
@dhardy Honestly, I think that the docs are plenty, and that the name is unwieldy otherwise. |
Renamed as suggested. @pitdicker about 30 of the new lines are documentation. If put directly in the Edit: rebased to clean up and fix doc |
O, the number of lines was no critique, just an observation 😄.
I don't know. It could be useful for some tests. But you would have to know quite some details of the implementation to use it when also using ranges, floats, distributions etc. Crazy idea: what do you think about making it conditionally available with |
I've been thinking about putting more stuff behind feature flags. We could have a "mock" feature flag then put this behind But, true, this is mostly useful for testing distribution implementations, and many of them are in Edit: I realise there's not much point using a feature gate since the linker removes any unused components anyway; besides it complicates documentation. I don't see a "guard" against use in release builds as helping much anyway. |
Port MockAddRng from my branch, but without SeedingRng impl and slightly different tests
I'm not quite sure on the name or whether it should be seedable, but amazingly this saves 5 independent implementations of
RngCore
in tests.