Distances.jl
Distances.jl copied to clipboard
Add `MinkowskiMetric` abstract type
This new type will allow third-party packages to differentiate Minkowski metrics at the type level. It will also allow third-party packages to implement their own Minkowski metrics.
A practical example of a package that could use this new abstract type is NearestNeighbors.jl, which is currently using a union type for this purpose:
https://github.com/KristofferC/NearestNeighbors.jl/blob/master/src/kd_tree.jl#L1
With this new type NearestNeighbors.j could use Minkowski metrics defined in any package.
Appreciate if a maintainer can review and merge this.
ping @KristofferC @dkarrasch
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.50%. Comparing base (
886ad02) to head (c9587a1).
Additional details and impacted files
@@ Coverage Diff @@
## master #265 +/- ##
==========================================
+ Coverage 95.86% 96.50% +0.64%
==========================================
Files 10 10
Lines 944 888 -56
==========================================
- Hits 905 857 -48
+ Misses 39 31 -8
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@nalimilan, this PR is ready. Can you review it please?