diff options
author | Arnur Nigmetov <nigmetov@tugraz.at> | 2020-02-19 15:25:33 +0100 |
---|---|---|
committer | Arnur Nigmetov <nigmetov@tugraz.at> | 2020-02-19 15:29:44 +0100 |
commit | be93a006a3f2c630abf9d0169a70e6292ac7504f (patch) | |
tree | 57ead4dd37953dc69aadd7e847f9997a72347013 /matching/src/tests/test_matching_distance.cpp | |
parent | dfb161cb17a546329921ce27e1d9c4fa93e2a506 (diff) |
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.
Diffstat (limited to 'matching/src/tests/test_matching_distance.cpp')
-rw-r--r-- | matching/src/tests/test_matching_distance.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/matching/src/tests/test_matching_distance.cpp b/matching/src/tests/test_matching_distance.cpp index 90baa0f..7cd71b2 100644 --- a/matching/src/tests/test_matching_distance.cpp +++ b/matching/src/tests/test_matching_distance.cpp @@ -112,8 +112,8 @@ TEST_CASE("Bifiltrations from file", "[matching_distance][small_example][lesnick { std::string fname_a, fname_b; - fname_a = "/home/narn/code/matching_distance/code/python_scripts/prism_1_lesnick.bif"; - fname_b = "/home/narn/code/matching_distance/code/python_scripts/prism_2_lesnick.bif"; + fname_a = "../src/tests/prism_1.bif"; + fname_b = "../src/tests/prism_2.bif"; Bifiltration bif_a(fname_a, BifiltrationFormat::phat_like); Bifiltration bif_b(fname_b, BifiltrationFormat::phat_like); @@ -137,11 +137,11 @@ TEST_CASE("Bifiltrations from file", "[matching_distance][small_example][lesnick params.bound_strategy = bs; params.traverse_strategy = ts; params.max_depth = 7; - params.delta = 0.01; + params.delta = 0.1; params.dim = 1; Real answer = matching_distance(bif_a_copy, bif_b_copy, params); Real correct_answer = lambda * 1.0; - REQUIRE(fabs(answer - correct_answer) < lambda * 0.05); + REQUIRE(fabs(answer - correct_answer) / correct_answer < params.delta); } } } |