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

Define equality between metrics #247

Open
mjp98 opened this issue Feb 24, 2023 · 0 comments
Open

Define equality between metrics #247

mjp98 opened this issue Feb 24, 2023 · 0 comments

Comments

@mjp98
Copy link

mjp98 commented Feb 24, 2023

Currently (Distances v0.10.7, Julia 1.8.5) testing equality between metrics parametrised by vectors returns false when comparing two instances, e.g.

julia> m = PeriodicEuclidean(ones(1))
PeriodicEuclidean{Vector{Float64}}([1.0])

julia> m == deepcopy(m)
false

Would it be possible to extend Base.:== and Base.hash for such cases to return true?

(This came up when trying to address JuliaGaussianProcesses/KernelFunctions.jl#492)

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

No branches or pull requests

1 participant