-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MinkowskiMetric
abstract type
#265
Conversation
Appreciate if a maintainer can review and merge this. |
ping @KristofferC @dkarrasch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to hurt anyone, so this LGTM, except for the consideration of adding two types vertically into the type hierarchy.
Codecov ReportAll modified and coverable lines are covered by tests ✅
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 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks much cleaner now and non-breaking.
Co-authored-by: Daniel Karrasch <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@nalimilan, this PR is ready. Can you review it please? |
Co-authored-by: Milan Bouchet-Valat <[email protected]>
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.