summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+}