dionysus
dionysus copied to clipboard
Longest edge of bottleneck matching
New function bottleneck_distance_with_edge returns a tuple (distance, longest_edge), where longest_edge is a tuple (index_1, index_2) with indices of the points in the input diagrams that realize the bottleneck distance. If the distance is 0 or infinity, both index_1 and index_2 will be -1. If only one of the indices is -1, then the point with non-negative index is matched to its diagonal projection. NB: By default this function computes the exact distance. If delta parameter is >0, then the longest_edge is the longest edge in one of the matchings that approximate the bottleneck distance. Minor change: Wasserstein power parameter type changed to real.
Hm, I think I'd rather keep a single function (bottleneck_distance
), and have it take an extra parameter (edge
) to indicate whether to compute a matching. It would have to return py::object
to be able to return either double or a pair, but that should be an easy fix.