summaryrefslogtreecommitdiff
path: root/src/Rips_complex
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-21 20:54:28 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-03-21 20:54:28 +0000
commitf0d8d8507bff9667289ac29539fe8714119f816a (patch)
tree02b119759bfe383d99e9694e84117b3ef2041218 /src/Rips_complex
parent54ed7a649fd461880693f5e9985dc529ae72a39f (diff)
expansion method and its associated test
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@2215 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 32ad429f301b35c064eadef36dbe4e7f64f6490e
Diffstat (limited to 'src/Rips_complex')
-rw-r--r--src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp3
-rw-r--r--src/Rips_complex/include/gudhi/Rips_complex.h15
2 files changed, 17 insertions, 1 deletions
diff --git a/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp b/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp
index 3fd69ebc..da915ecb 100644
--- a/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp
+++ b/src/Rips_complex/example/example_one_skeleton_rips_from_points.cpp
@@ -30,7 +30,8 @@ int main() {
Rips_complex rips_complex_from_points(points, threshold, Euclidean_distance());
Simplex_tree stree;
- rips_complex_from_points.create_complex(stree, 1);
+ rips_complex_from_points.create_complex(stree, 3);
+ stree.initialize_filtration();
// ----------------------------------------------------------------------------
// Display information about the one skeleton Rips complex
// ----------------------------------------------------------------------------
diff --git a/src/Rips_complex/include/gudhi/Rips_complex.h b/src/Rips_complex/include/gudhi/Rips_complex.h
index 1e4b76a7..42669e8b 100644
--- a/src/Rips_complex/include/gudhi/Rips_complex.h
+++ b/src/Rips_complex/include/gudhi/Rips_complex.h
@@ -116,6 +116,21 @@ class Rips_complex {
// insert the proximity graph in the simplicial complex
complex.insert_graph(rips_skeleton_graph_);
+
+ std::cout << "********************************************************************\n";
+ // Display the complex
+ std::cout << "* The complex contains " << complex.num_simplices() << " simplices\n";
+ std::cout << " - dimension " << complex.dimension() << " - filtration " << complex.filtration() << "\n";
+ std::cout << "* Iterator on Simplices in the filtration, with [filtration value]:\n";
+ for (auto f_simplex : complex.filtration_simplex_range()) {
+ std::cout << " " << "[" << complex.filtration(f_simplex) << "] ";
+ for (auto vertex : complex.simplex_vertex_range(f_simplex)) {
+ std::cout << static_cast<int>(vertex) << " ";
+ }
+ std::cout << std::endl;
+ }
+
+
// expand the graph until dimension dim_max
complex.expansion(dim_max);
}