Add functions to simplify creating sub-RNGs#3775
Merged
addisoncrump merged 9 commits intoAFLplusplus:mainfrom Apr 2, 2026
Merged
Add functions to simplify creating sub-RNGs#3775addisoncrump merged 9 commits intoAFLplusplus:mainfrom
addisoncrump merged 9 commits intoAFLplusplus:mainfrom
Conversation
addisoncrump
requested changes
Mar 31, 2026
addisoncrump
requested changes
Mar 31, 2026
addisoncrump
requested changes
Apr 1, 2026
Member
addisoncrump
left a comment
There was a problem hiding this comment.
Sorry to nitpick, but there are some design issues to address here.
Contributor
Author
|
Just to follow up: I've made the requested changes, but had some thoughts about the best way to go about it. My code is as follows: SubRng no longer has Rand + Sized + Clone, and I've removed the default implementation from the trait body and moved the logic to the impl block. I noticed that there were multiple RNGs (StdRand, Sfc64Rand, etc.) so I assumed that this would be the best approach, but I'm happy to change things if needed. Thank you again for the feedback! |
addisoncrump
approved these changes
Apr 2, 2026
Member
addisoncrump
left a comment
There was a problem hiding this comment.
I made some final changes to clean up some lints + use preferred formatting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #3774. I updated the
Randtrait to have a method (create_sub_rng) that creates a sub-RNG seeded from the current RNG state and added a simple method (sub_rand) to theHasRandtrait for the sake of convenience when calling this function.I also made a small update to MIGRATION.md (after reading through CONTRIBUTION.md) and added a function to test my changes. As this is my first attempt at contributing to this repository, I would really appreciate any and all feedback. Thank you!