KernelFunctions.jl
KernelFunctions.jl copied to clipboard
Fix and complete equality definitions
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