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

Feature/copy sampler #74

Merged
merged 4 commits into from
Jun 2, 2024
Merged

Feature/copy sampler #74

merged 4 commits into from
Jun 2, 2024

Conversation

adolgert
Copy link
Owner

@adolgert adolgert commented Jun 1, 2024

This adds a copy! command to samplers. It copies from a source sampler to a destination sampler of the same type, so it's copy!(destination::T, source::T). WHY? If you want to simulate rare events, you can split the simulation run into N simulations, each with its own random number generator. When you split the run, you have to copy the state of the simulation, including the state of the sampler.

@adolgert adolgert merged commit f070409 into main Jun 2, 2024
4 checks passed
@adolgert adolgert deleted the feature/copy-sampler branch June 2, 2024 01:56
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