Skip to content
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

Add optional --seed parameter to Rho8Pointer #420

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jfbourdon
Copy link
Contributor

Due to the stochastic nature of the Rho8 algorithm in its current implementation, it is not possible to get the same output two times from Rho8Pointer which could be an issue in research and development as it doesn't allow reproducible results. This PR adds an optional -seed parameter for cases where a result must be replicated.

It must be noted that I changed the original random number generator rand::thread_rng() by StdRng::from_entropy() in order to make it compatible with the seeded generator StdRng::seed_from_u64(). I don't think it will have any impact on the randomness of the original method, but I don't know enough about theses functions to be sure.

As, there is currently no check to make sure that a positive integer was provided to --seed, the current code will panic if a negative integer is provided.

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.

1 participant