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

Allow registering as user-supplied RNG #67

Merged
merged 13 commits into from Sep 30, 2023
Merged

Conversation

rstub
Copy link
Member

@rstub rstub commented Sep 24, 2023

  • Partially addresses More distribution functions #22
  • Needs documentation
  • Important: One MUST not use the user supplied normal.kind w/o the user supplied kind, i.e. only RNGkind("user") or RNGkind("user", "user") must be used.
  • Does it make sense to set this automatically if some option has been set?

The actual RNG is only seeded in init() instead of (re)created. This allows for calling dqset.seed(NULL) w/o resetting the RNG to the default type.
The RNG get's initialized by R via user_unif_init() making it unnecessary to call dqset_seed(NULL).
This way set.seed(<num>) and dqset.seed(<num>) give the same result. It is the task of the RNG to iniitalize its state in a sensible manner.
@rstub rstub merged commit 7ef97be into master Sep 30, 2023
7 checks passed
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.

None yet

1 participant