KernelFunctions.jl icon indicating copy to clipboard operation
KernelFunctions.jl copied to clipboard

Fix and complete equality definitions

Open devmotion opened this issue 4 years ago • 0 comments

If one defines isequal one has to define hash as well since otherwise the two are not consistent. In general, if one does not care about floating point comparisons one should just define == instead of isequal since isequal falls back to ==. Here it probably would make sense to define both since it would lead to different comparisons of the kernel parameters and parameters of the transform.

Basically, most often one wants the recursive implementation in https://github.com/andrewcooke/AutoHashEquals.jl/issues/18.

Originally posted by @devmotion in https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/pull/335#discussion_r666911524

devmotion avatar Jul 09 '21 20:07 devmotion