summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2016-09-29 15:32:19 +0200
committerUlrich Bauer <mail@ulrich-bauer.org>2016-09-29 15:32:19 +0200
commit1912b703496607999c3ce09ef24e680304a6a093 (patch)
tree2bf5cee5f49ac034ee4c91c3c8257cc78a61841a
parentbd64593698d032e7518eb3ee3c3a3b1a0193f66d (diff)
suppress output of 0-persistence pairs in dim 0
-rw-r--r--ripser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 3d4eb29..41600b8 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -926,7 +926,8 @@ int main(int argc, char** argv) {
if (u != v) {
#ifdef PRINT_PERSISTENCE_PAIRS
- std::cout << " [0," << get_diameter(e) << ")" << std::endl;
+ if (get_diameter(e) > 0)
+ std::cout << " [0," << get_diameter(e) << ")" << std::endl;
#endif
dset.link(u, v);
} else
@@ -954,4 +955,4 @@ int main(int argc, char** argv) {
assemble_columns_to_reduce(columns_to_reduce, pivot_column_index, comp, dim, n, threshold, binomial_coeff);
}
}
-} \ No newline at end of file
+}