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

DM-30829: Add persistence for WarpingControl #597

Merged
merged 4 commits into from Jun 24, 2021
Merged

Conversation

kfindeisen
Copy link
Member

This PR makes WarpingControl a Persistable and implements persistence. Since a WarpingControl may contain arbitrary kernels (not just the designated "warping" kernels), representing the state required making the kernels typically used with WarpingControl persistable as well. These were given only skeletal support, however, on the assumption that they would only be persisted as subobjects.

Copy link
Contributor

@jmeyers314 jmeyers314 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just a couple small inline questions for my own c++ education.

While you're at this, in Persistable.h:67, could you change PersistenceFactory to PersistableFactory? This has bothered me for a while but I've been too lazy to do anything about it. Now seems like a good time.

protected:
void setKernelParameter(unsigned int ind, double value) const override;

std::string getPersistenceName() const override { return "LanczosWarpingKernel"; }
Copy link
Contributor

Choose a reason for hiding this comment

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

Why make isPersistable noexcept and not getPersistenceName or getPythonModule? Is it just that allocating the std::string return might fail?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, exactly.

src/math/warpExposure.cc Show resolved Hide resolved
src/math/warpExposure.cc Show resolved Hide resolved
@kfindeisen kfindeisen merged commit 2736904 into master Jun 24, 2021
@kfindeisen kfindeisen deleted the tickets/DM-30829 branch June 24, 2021 20:35
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

2 participants