summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Bauer <mail@ulrich-bauer.org>2016-09-29 15:32:36 +0200
committerUlrich Bauer <mail@ulrich-bauer.org>2016-09-29 15:32:36 +0200
commitf62bf9d9c8d639474525f6b06f9ed5e7d605f53e (patch)
treea8f888ab17fa4fa54bd6a48c573399e58c843040
parentf31f1d94bc2367c27e306562c2f0492d2f0e87ab (diff)
parent1912b703496607999c3ce09ef24e680304a6a093 (diff)
Merge branch 'dev' into sparse-distance-matrix
* dev: suppress output of 0-persistence pairs in dim 0 fixed license header
-rw-r--r--ripser.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 713c70b..ec73f6d 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -1,19 +1,23 @@
-/* Ripser: a lean C++ code for the computation of Vietoris-Rips persistence barcodes
+/*
- Copyright 2015-2016 Ulrich Bauer.
+Ripser: a lean C++ code for computation of Vietoris-Rips persistence barcodes
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+Copyright 2015-2016 Ulrich Bauer.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+This program is free software: you can redistribute it and/or modify it under
+the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation, either version 3 of the License, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+
+*/
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
//#define ASSEMBLE_REDUCTION_MATRIX
//#define USE_COEFFICIENTS
@@ -1084,7 +1088,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