Fix blue_noise and random_points_on_mesh reproducibility#2235
Merged
alecjacobson merged 8 commits intomainfrom Aug 18, 2023
Merged
Fix blue_noise and random_points_on_mesh reproducibility#2235alecjacobson merged 8 commits intomainfrom
alecjacobson merged 8 commits intomainfrom
Conversation
- added new overload for `blue_noise` and `random_points_on_mesh` for that accept an UnformRandomBitGenerator as input. The default signature (ie without URBG) still works, and uses by default std::minstd_rand initialized with random seed generated by std::rand(). This is following the existing behaviour of `randperm`. - added reproducibility test case for `blue_noise` and `random_points_on_mesh`
…rameter now use a fixed default seed ie `std::minstd_rand()` default seed
4 tasks
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.
Modified version of #2057 by seb-tourneux
Original text from seb-tourneux:
Add new overloads for blue_noise and random_points_on_mesh for that accept an UnformRandomBitGenerator as input. The default signature (ie without URBG) still works, and uses by default std::minstd_rand initialized with random seed generated by std::rand(). This is following the existing behaviour of randperm.
Corrects the previous uses of rand() and VectorXs::Random that forced the use of srand() and thus preventing the use of a local seed.
Add reproducibility test case for blue_noise and random_points_on_mesh
Fixes #2053 .