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

Add `MinkowskiMetric` abstract type

Open eliascarv opened this issue 1 year ago • 4 comments
trafficstars

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.

eliascarv avatar Oct 09 '24 19:10 eliascarv

Appreciate if a maintainer can review and merge this.

juliohm avatar Oct 15 '24 17:10 juliohm

ping @KristofferC @dkarrasch

juliohm avatar Oct 17 '24 09:10 juliohm

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.

codecov-commenter avatar Oct 17 '24 12:10 codecov-commenter

@nalimilan, this PR is ready. Can you review it please?

eliascarv avatar Oct 21 '24 11:10 eliascarv