diff options
author | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-06-19 21:49:23 +0200 |
---|---|---|
committer | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-06-19 21:49:23 +0200 |
commit | 4e3fcd2f8596f39b9bff8cdd8d9789fdffe8a49c (patch) | |
tree | 56c7c5853f8ca015ca2d04758991262a716fc944 /geom_bottleneck/example | |
parent | a9d06f12ecbaa055d17970e09827ea7b67d1f53c (diff) |
Longest edge for bottleneck, tests for bottleneck
Diffstat (limited to 'geom_bottleneck/example')
-rw-r--r-- | geom_bottleneck/example/bottleneck_dist.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/geom_bottleneck/example/bottleneck_dist.cpp b/geom_bottleneck/example/bottleneck_dist.cpp index 91c4190..8966789 100644 --- a/geom_bottleneck/example/bottleneck_dist.cpp +++ b/geom_bottleneck/example/bottleneck_dist.cpp @@ -57,6 +57,7 @@ int main(int argc, char* argv[]) } double res; + hera::bt::MatchingEdge<double> e; if (argc >= 4) { // the third parameter is epsilon, // return approximate distance (faster) @@ -65,7 +66,7 @@ int main(int argc, char* argv[]) if (useSamplingHeur && diagramA.size() > heurThreshold && diagramB.size() > heurThreshold) { res = hera::bottleneckDistApproxHeur(diagramA, diagramB, delta); } else { - res = hera::bottleneckDistApprox(diagramA, diagramB, delta); + res = hera::bottleneckDistApprox(diagramA, diagramB, delta, e, true); } } else if (delta == 0.0) { res = hera::bottleneckDistExact(diagramA, diagramB, decPrecision); @@ -75,10 +76,12 @@ int main(int argc, char* argv[]) } } else { // only filenames have been supplied, return exact distance - res = hera::bottleneckDistExact(diagramA, diagramB, decPrecision); + res = hera::bottleneckDistExact(diagramA, diagramB, decPrecision, e, true); + } std::cout << std::setprecision(15) << res << std::endl; - + //std::cout << "Longest edge " << e.first.get_user_id() << " <-> " << e.second.get_user_id() << std::endl; + //std::cout << "Longest edge " << e.first << " <-> " << e.second << std::endl; // Alternative could be to construct DiagramPointSet // using the constructor with iterators. // May be useful if the same diagram is used multiple times |