diff options
author | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-06-03 22:39:49 +0200 |
---|---|---|
committer | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-06-03 22:39:49 +0200 |
commit | a9d06f12ecbaa055d17970e09827ea7b67d1f53c (patch) | |
tree | c3fd2db39266cb76b3d8eefb005c0580ed97dfbd /geom_bottleneck/include/bound_match.hpp | |
parent | c76e88bca80bfb4d29684891f2a954064532c2d0 (diff) |
First tests added
Preparation for longest edge computation.
Diffstat (limited to 'geom_bottleneck/include/bound_match.hpp')
-rw-r--r-- | geom_bottleneck/include/bound_match.hpp | 13 |
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> |