Skip to content

Conversation

@s6pepaul
Copy link
Contributor

No description provided.

@s6pepaul s6pepaul requested a review from jrstevenjlab March 22, 2024 13:05
Copy link
Contributor

@mashephe mashephe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change to support reproducibility. Just a note that this ProductionMechanism class will become obsolete with the new FixedTargetGenerator. If anyone is writing a new generator, it would make sense to write it around FixedTargetGenerator.

@mashephe mashephe merged commit 2b9b6ed into master Mar 22, 2024
@mashephe
Copy link
Contributor

This PR has been closed, but for an upcoming PR I'm going to make a small change to this implementation. I think it would be generally better if the classes held their own instance of the TRandom class each with settable seed. As implemented above, setting the seed affects the global gRandom instance. While this should have the desired effect of reproducible results with the same seed it introduces a potential complexity in how the sequence of random numbers might depend on other classes using the same global random number generator.

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.

4 participants