summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnur Nigmetov <a.nigmetov@gmail.com>2017-04-24 22:02:22 +0200
committerArnur Nigmetov <a.nigmetov@gmail.com>2017-04-24 22:02:22 +0200
commitbd045319b682622c8679697055c70b739cc95c24 (patch)
treeb143f300272876eedc17436d329d207de966d595
parent8fb72abe8d5eb4fe715b69545422b16655cc1ec3 (diff)
Some more debug output
-rw-r--r--geom_bottleneck/example/bottleneck_dist.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/geom_bottleneck/example/bottleneck_dist.cpp b/geom_bottleneck/example/bottleneck_dist.cpp
index b27bdbb..81d8605 100644
--- a/geom_bottleneck/example/bottleneck_dist.cpp
+++ b/geom_bottleneck/example/bottleneck_dist.cpp
@@ -35,11 +35,20 @@ int main(int argc, char* argv[])
double approxEpsilon = atof(argv[3]);
if (approxEpsilon > 0.0) {
if (useSamplingHeur && diagramA.size() > heurThreshold && diagramB.size() > heurThreshold) {
+#ifdef VERBOSE_BOTTLENECK
+ std::cout << "using sampling heuristic" << std::endl;
+#endif
res = geom_bt::bottleneckDistApproxHeur(diagramA, diagramB, approxEpsilon);
} else {
+#ifdef VERBOSE_BOTTLENECK
+ std::cout << "NOT using sampling heuristic" << std::endl;
+#endif
res = geom_bt::bottleneckDistApprox(diagramA, diagramB, approxEpsilon);
}
} else if (approxEpsilon == 0.0) {
+#ifdef VERBOSE_BOTTLENECK
+ std::cout << "NOT using sampling heuristic, computing EXACT answer" << std::endl;
+#endif
res = geom_bt::bottleneckDistExact(diagramA, diagramB, decPrecision);
} else {
std::cerr << "The third parameter (relative error) must be positive!" << std::endl;
@@ -47,6 +56,9 @@ int main(int argc, char* argv[])
}
} else {
// only filenames have been supplied, return exact distance
+#ifdef VERBOSE_BOTTLENECK
+ std::cout << "NOT using sampling heuristic, computing EXACT answer" << std::endl;
+#endif
res = geom_bt::bottleneckDistExact(diagramA, diagramB, decPrecision);
}
std::cout << std::setprecision(15) << res << std::endl;