Skip to content

Define equality between metrics #247

Open
@mjp98

Description

@mjp98

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions