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

DataMisfitController() == DataMisfitController() gives false #297

Closed
odunbar opened this issue Jun 13, 2023 · 0 comments · Fixed by #298
Closed

DataMisfitController() == DataMisfitController() gives false #297

odunbar opened this issue Jun 13, 2023 · 0 comments · Fixed by #298

Comments

@odunbar
Copy link
Collaborator

odunbar commented Jun 13, 2023

For some types, the Scheduler() == Scheduler() gives false, which is likely to cause test failures.
(Note that all the internal fields give true on "==")

Need to override == as done for ParameterDistributions here:

Base.:(==)(p_a::ParameterDistributionType, p_b::ParameterDistributionType) =
get_distribution(p_a) == get_distribution(p_b)
Base.:(==)(c_a::ConstraintType, c_b::ConstraintType) = typeof(c_a) == typeof(c_b) && get_bounds(c_a) == get_bounds(c_b)
Base.:(==)(pd_a::ParameterDistribution, pd_b::ParameterDistribution) =
get_distribution(pd_a) == get_distribution(pd_b) &&
get_all_constraints(pd_a) == get_all_constraints(pd_b) &&
get_name(pd_a) == get_name(pd_b)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant