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

DiscreteDemography needs copy/deepcopy support #771

Closed
molpopgen opened this issue Jun 15, 2021 · 3 comments · Fixed by #773
Closed

DiscreteDemography needs copy/deepcopy support #771

molpopgen opened this issue Jun 15, 2021 · 3 comments · Fixed by #773
Milestone

Comments

@molpopgen
Copy link
Owner

The former should be shallow, ignoring the internal state. Effectively, copy will return an "unevolved" demography.
The deepcopy, though, will lift over the internal state stored in the unique_ptr, thus allowing repeated "re-evolution" starting from the same time point of the demographic model.

cc @apragsdale

@molpopgen molpopgen added this to the 0.16.0 milestone Jun 15, 2021
@molpopgen
Copy link
Owner Author

Technical note re: the back end. The class will need updating to (I think) the "rule of five".

@molpopgen
Copy link
Owner Author

Sigh--this is nasty due to overly-tight coupling between the DiscreteDemography class and the "current state of the model" class.

@molpopgen molpopgen linked a pull request Jun 15, 2021 that will close this issue
@molpopgen
Copy link
Owner Author

Close by #773

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 a pull request may close this issue.

1 participant