summaryrefslogtreecommitdiff
path: root/matching/src/main.cpp
diff options
context:
space:
mode:
authorArnur Nigmetov <nigmetov@tugraz.at>2020-02-19 17:42:41 +0100
committerArnur Nigmetov <nigmetov@tugraz.at>2020-02-19 17:42:41 +0100
commitf62d98e76b9dff173f9144caddff1217d0bb81a9 (patch)
tree4ea6a6d894114c0d98c91079edfcc59d0611eb14 /matching/src/main.cpp
parentbe93a006a3f2c630abf9d0169a70e6292ac7504f (diff)
Require first file line specify the format.
1. Input format must be in the first line of input file, as in RIVET. 2. Disable more unnecessary output. 3. Get rid of some warnings.
Diffstat (limited to 'matching/src/main.cpp')
-rw-r--r--matching/src/main.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/matching/src/main.cpp b/matching/src/main.cpp
index 7e74475..f1472be 100644
--- a/matching/src/main.cpp
+++ b/matching/src/main.cpp
@@ -22,9 +22,9 @@ using namespace md;
namespace fs = std::experimental::filesystem;
+#ifdef PRINT_HEAT_MAP
void print_heat_map(const md::HeatMaps& hms, std::string fname, const CalculationParams& params)
{
-#ifdef PRINT_HEAT_MAP
spd::debug("Entered print_heat_map");
std::set<Real> mu_vals, lambda_vals;
auto hm_iter = hms.end();
@@ -130,23 +130,25 @@ void print_heat_map(const md::HeatMaps& hms, std::string fname, const Calculatio
ofs.close();
spd::debug("Exit print_heat_map");
-#endif
}
+#endif
int main(int argc, char** argv)
{
spdlog::set_level(spdlog::level::info);
- //spdlog::set_pattern("[%L] %v");
using opts::Option;
using opts::PosOption;
opts::Options ops;
bool help = false;
- bool heatmap_only = false;
bool no_stop_asap = false;
CalculationParams params;
+#ifdef PRINT_HEAT_MAP
+ bool heatmap_only = false;
+#endif
+
std::string bounds_list_str = "local_combined";
std::string traverse_list_str = "BFS";
@@ -176,13 +178,13 @@ int main(int argc, char** argv)
auto bounds_list = split_by_delim(bounds_list_str, ',');
auto traverse_list = split_by_delim(traverse_list_str, ',');
- Bifiltration bif_a(fname_a, BifiltrationFormat::phat_like);
- Bifiltration bif_b(fname_b, BifiltrationFormat::phat_like);
+ Bifiltration bif_a(fname_a);
+ Bifiltration bif_b(fname_b);
bif_a.sanity_check();
bif_b.sanity_check();
- spd::info("Read bifiltrations {} {}", fname_a, fname_b);
+ spd::debug("Read bifiltrations {} {}", fname_a, fname_b);
std::vector<BoundStrategy> bound_strategies;
std::vector<TraverseStrategy> traverse_strategies;
@@ -195,13 +197,15 @@ int main(int argc, char** argv)
traverse_strategies.push_back(ts_from_string(s));
}
+
+#ifdef EXPERIMENTAL_TIMING
+
for(auto bs : bound_strategies) {
for(auto ts : traverse_strategies) {
spd::info("Will test combination {} {}", bs, ts);
}
}
-#ifdef EXPERIMENTAL_TIMING
struct ExperimentResult {
CalculationParams params {CalculationParams()};
int n_hera_calls {0};
@@ -360,6 +364,8 @@ int main(int argc, char** argv)
params.bound_strategy = bound_strategies.back();
params.traverse_strategy = traverse_strategies.back();
+ spd::debug("Will use {} bound, {} traverse strategy", params.bound_strategy, params.traverse_strategy);
+
Real dist = matching_distance(bif_a, bif_b, params);
std::cout << dist << std::endl;
#endif