summaryrefslogtreecommitdiff
path: root/geom_bottleneck/bottleneck/src/bound_match.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'geom_bottleneck/bottleneck/src/bound_match.cpp')
-rw-r--r--geom_bottleneck/bottleneck/src/bound_match.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/geom_bottleneck/bottleneck/src/bound_match.cpp b/geom_bottleneck/bottleneck/src/bound_match.cpp
index a9ec93a..a95ee60 100644
--- a/geom_bottleneck/bottleneck/src/bound_match.cpp
+++ b/geom_bottleneck/bottleneck/src/bound_match.cpp
@@ -21,6 +21,11 @@ along with GeomBottleneck. If not, see <http://www.gnu.org/licenses/>.
#include <assert.h>
#include "def_debug_bt.h"
#include "bound_match.h"
+
+#ifdef VERBOSE_BOTTLENECK
+#include <chrono>
+#endif
+
#ifndef FOR_R_TDA
#include <iostream>
#endif
@@ -245,7 +250,19 @@ BoundMatchOracle::BoundMatchOracle(DiagramPointSet psA, DiagramPointSet psB,
bool BoundMatchOracle::isMatchLess(double r)
{
- return buildMatchingForThreshold(r);
+#ifdef VERBOSE_BOTTLENECK
+ std::chrono::high_resolution_clock hrClock;
+ std::chrono::time_point<std::chrono::high_resolution_clock> startMoment;
+ startMoment = hrClock.now();
+#endif
+ bool result = buildMatchingForThreshold(r);
+#ifdef VERBOSE_BOTTLENECK
+ auto endMoment = hrClock.now();
+ std::chrono::duration<double, std::milli> iterTime = endMoment - startMoment;
+ std::cout << "isMatchLess for r = " << r << " finished in " << std::chrono::duration<double, std::milli>(iterTime).count() << " ms." << std::endl;
+#endif
+ return result;
+
}