summaryrefslogtreecommitdiff
path: root/src/Persistent_cohomology/example/rips_multifield_persistence.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-16 11:05:25 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-12-16 11:05:25 +0000
commite897b33b3184a230a24ddeff03c6b4ec070f2ab7 (patch)
tree673d070cf08800b17fbe0d50278cf89ede3c69a3 /src/Persistent_cohomology/example/rips_multifield_persistence.cpp
parent8340ca1acd568c93d115fcd46a996749a8cc295d (diff)
Fix persistence rips after create_complex voidification
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/distance_matrix_in_rips_module@1896 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d4a1258ea01bae048f30621594d0daf280fd8abb
Diffstat (limited to 'src/Persistent_cohomology/example/rips_multifield_persistence.cpp')
-rw-r--r--src/Persistent_cohomology/example/rips_multifield_persistence.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/Persistent_cohomology/example/rips_multifield_persistence.cpp b/src/Persistent_cohomology/example/rips_multifield_persistence.cpp
index 3389d8e1..7674b5a5 100644
--- a/src/Persistent_cohomology/example/rips_multifield_persistence.cpp
+++ b/src/Persistent_cohomology/example/rips_multifield_persistence.cpp
@@ -67,29 +67,29 @@ int main(int argc, char * argv[]) {
// Construct the Rips complex in a Simplex Tree
Simplex_tree simplex_tree;
- if (rips_complex_from_file.create_complex(simplex_tree, dim_max)) {
- std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n";
- std::cout << " and has dimension " << simplex_tree.dimension() << " \n";
-
- // Sort the simplices in the order of the filtration
- simplex_tree.initialize_filtration();
-
- // Compute the persistence diagram of the complex
- Persistent_cohomology pcoh(simplex_tree);
- // initializes the coefficient field for homology
- pcoh.init_coefficients(min_p, max_p);
-
- pcoh.compute_persistent_cohomology(min_persistence);
-
- // Output the diagram in filediag
- if (filediag.empty()) {
- pcoh.output_diagram();
- } else {
- std::ofstream out(filediag);
- pcoh.output_diagram(out);
- out.close();
- }
+ rips_complex_from_file.create_complex(simplex_tree, dim_max);
+ std::cout << "The complex contains " << simplex_tree.num_simplices() << " simplices \n";
+ std::cout << " and has dimension " << simplex_tree.dimension() << " \n";
+
+ // Sort the simplices in the order of the filtration
+ simplex_tree.initialize_filtration();
+
+ // Compute the persistence diagram of the complex
+ Persistent_cohomology pcoh(simplex_tree);
+ // initializes the coefficient field for homology
+ pcoh.init_coefficients(min_p, max_p);
+
+ pcoh.compute_persistent_cohomology(min_persistence);
+
+ // Output the diagram in filediag
+ if (filediag.empty()) {
+ pcoh.output_diagram();
+ } else {
+ std::ofstream out(filediag);
+ pcoh.output_diagram(out);
+ out.close();
}
+
return 0;
}