From be93a006a3f2c630abf9d0169a70e6292ac7504f Mon Sep 17 00:00:00 2001 From: Arnur Nigmetov Date: Wed, 19 Feb 2020 15:25:33 +0100 Subject: Fix BifiltrationProxy bug; disable debug output. 1. Same bifiltration was used in constructing two bifiltration proxies; the second bifiltration was ignored. Fixed. 2. Switched from spd::info to spd::debug in most places. 3. Get rid of absolute paths for test bifiltrations. --- matching/include/matching_distance.h | 3 +++ matching/include/matching_distance.hpp | 13 ++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'matching/include') diff --git a/matching/include/matching_distance.h b/matching/include/matching_distance.h index bb1dfea..bb10203 100644 --- a/matching/include/matching_distance.h +++ b/matching/include/matching_distance.h @@ -72,6 +72,9 @@ namespace md { // (we just return something large enough to prune the cell) bool stop_asap { true }; + // print statistics on each quad-tree level + bool print_stats { false }; + #ifdef PRINT_HEAT_MAP HeatMaps heat_maps; #endif diff --git a/matching/include/matching_distance.hpp b/matching/include/matching_distance.hpp index 218f33b..d2d2fbc 100644 --- a/matching/include/matching_distance.hpp +++ b/matching/include/matching_distance.hpp @@ -209,7 +209,7 @@ namespace md { assert(std::min({module_a_.min_x(), module_b_.min_x(), module_a_.min_y(), module_b_.min_y()}) >= 0); - spd::info("DistanceCalculator constructed, module_a: max_x = {}, max_y = {}, module_b: max_x = {}, max_y = {}", + spd::debug("DistanceCalculator constructed, module_a: max_x = {}, max_y = {}, module_b: max_x = {}, max_y = {}", module_a_.max_x(), module_a_.max_y(), module_b_.max_x(), module_b_.max_y()); } @@ -514,7 +514,7 @@ namespace md { std::map n_cells_discarded; std::map n_cells_pruned; - spd::info("Enter get_distance_pq, bound strategy = {}, traverse strategy = {}, stop_asap = {} ", + spd::debug("Enter get_distance_pq, bound strategy = {}, traverse strategy = {}, stop_asap = {} ", params_.bound_strategy, params_.traverse_strategy, params_.stop_asap); std::chrono::high_resolution_clock timer; @@ -748,16 +748,15 @@ namespace md { // otherwise actual_error in params can be larger than delta, // but this is OK - spd::info("#############################################################"); - spd::info( + spd::debug("#############################################################"); + spd::debug( "Exiting get_distance_pq, bound_strategy = {}, traverse_strategy = {}, lower_bound = {}, upper_bound = {}, current_error = {}, actual_max_level = {}", params_.bound_strategy, params_.traverse_strategy, lower_bound, upper_bound, params_.actual_error, params_.actual_max_depth); - spd::info("#############################################################"); + spd::debug("#############################################################"); - bool print_stats = true; - if (print_stats) { + if (params_.print_stats) { fmt::print("EXIT STATS, cells considered:\n"); print_map(n_cells_considered); fmt::print("EXIT STATS, cells discarded:\n"); -- cgit v1.2.3