diff options
author | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-03-06 22:09:20 +0100 |
---|---|---|
committer | Arnur Nigmetov <a.nigmetov@gmail.com> | 2018-03-06 22:09:20 +0100 |
commit | c01bfb9543b1144e2c5adf291eac50c489c501b6 (patch) | |
tree | 74e15864686b06bfdbcde60c558a95b5510ef424 /geom_matching/wasserstein/include/diagram_reader.h | |
parent | e77514fbcb7e8aa2d91747e95e1250820d223bae (diff) |
Points with 0 persistence ignored in the input
Diffstat (limited to 'geom_matching/wasserstein/include/diagram_reader.h')
-rw-r--r-- | geom_matching/wasserstein/include/diagram_reader.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/geom_matching/wasserstein/include/diagram_reader.h b/geom_matching/wasserstein/include/diagram_reader.h index 8d09c9b..5c690fa 100644 --- a/geom_matching/wasserstein/include/diagram_reader.h +++ b/geom_matching/wasserstein/include/diagram_reader.h @@ -151,7 +151,13 @@ bool read_diagram_point_set(const char* fname, ContType_& result, int& decPrecis x = parse_real_from_str<RealType>(str_x); y = parse_real_from_str<RealType>(str_y); - result.push_back(std::make_pair(x, y)); + if (x != y) { + result.push_back(std::make_pair(x, y)); + } else { +#ifndef FOR_R_TDA + std::cerr << "Warning: point with 0 persistence ignored in " << fname << ":" << lineNumber << "\n"; +#endif + } } catch (const std::invalid_argument& e) { #ifndef FOR_R_TDA |