In general, I think we should stop implementing internal, unexported and undocumented functions from Distances if it does not provide any clear performance benefit (e.g. in DotProduct). Nowadays it should be sufficient to just define (::Dist)(x, y) for the desired types of x and y. This could be added to this PR or done separately.
(Edit: At some point, we should probably make the long-proposed move and roll our own binary ops system with a Distances fallback and do not incorrectly declare these operations as metrics)
Addresses https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/pull/370#discussion_r723545170 and similar comments in the PR (let's see if it breaks anything and what additional fixes are needed :smile:).
In general, I think we should stop implementing internal, unexported and undocumented functions from Distances if it does not provide any clear performance benefit (e.g. in
DotProduct
). Nowadays it should be sufficient to just define(::Dist)(x, y)
for the desired types ofx
andy
. This could be added to this PR or done separately.(Edit: At some point, we should probably make the long-proposed move and roll our own binary ops system with a Distances fallback and do not incorrectly declare these operations as metrics)