Skip to content

Fix blue_noise and random_points_on_mesh reproducibility#2235

Merged
alecjacobson merged 8 commits intomainfrom
seb-tourneux-main
Aug 18, 2023
Merged

Fix blue_noise and random_points_on_mesh reproducibility#2235
alecjacobson merged 8 commits intomainfrom
seb-tourneux-main

Conversation

@alecjacobson
Copy link
Copy Markdown
Contributor

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 .

stourneux and others added 4 commits July 12, 2022 12:06
- 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
@alecjacobson alecjacobson merged commit 62fe771 into main Aug 18, 2023
@alecjacobson alecjacobson deleted the seb-tourneux-main branch August 18, 2023 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

blue_noise reproductibility

2 participants