summaryrefslogtreecommitdiff
path: root/geom_bottleneck/include/bound_match.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'geom_bottleneck/include/bound_match.hpp')
-rw-r--r--geom_bottleneck/include/bound_match.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/geom_bottleneck/include/bound_match.hpp b/geom_bottleneck/include/bound_match.hpp
index 221bd0f..bb7dead 100644
--- a/geom_bottleneck/include/bound_match.hpp
+++ b/geom_bottleneck/include/bound_match.hpp
@@ -217,6 +217,19 @@ void Matching<R>::trimMatching(const R newThreshold)
sanityCheck();
}
+template<class R>
+MatchingEdge<R> Matching<R>::get_longest_edge() const
+{
+ R max_dist = -1.0;
+ MatchingEdge<R> edge;
+ for(const auto& x : AToB) {
+ if (max_dist < distLInf(x.first, x.second)) {
+ edge = x;
+ }
+ }
+ return edge;
+}
+
// ------- BoundMatchOracle --------------
template<class R, class NO>