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
Metric concepts #791
Metric concepts #791
Conversation
It is not exactly related, but I remember when using metrics that I miss a "squaredLength" method to speed up things. It is possible to add this (like in CGAL) in Metric ? |
There is this sort of things in DistanceTransformation (to get error free DT values) but I agree that it could be useful in CMetric. How would you name this method ?
(in all cases, the |
@JacquesOlivierLachaud, any advice for the "exact..." function name ? |
In fact, I was more proposing to add another method that returns the squared length ("squaredLength" ?). So the exactness is one aspect, the computation speed is another. |
ok but 'squared' won't make sense for l_p nor path based metrics. |
You are right. However, 99% of distance computation are with Euclidean distance (or power metric with also squares). Therefore, such a method induces a lot of computation savings at many places (for instance in DistanceBreadthFirstVisitor). So two options:
|
For l_p models, such function already exists under the name |
( |
Working on it.. I'll reopen it when ready |
Simplification of Metric concepts:
local
method).