From 0729a55a67503c068e4843c63930d6b29e76f7ac Mon Sep 17 00:00:00 2001 From: pdlotko Date: Fri, 3 Nov 2017 05:10:17 +0000 Subject: a few more changes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/rips_complex_from_correlation_matrix@2823 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: d12b2413620003883e82b3022f8d933aa05e2856 --- .../example_one_skeleton_rips_from_correlation_matrix.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/Rips_complex/example') diff --git a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp index ae347a00..d1ccbf31 100644 --- a/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp +++ b/src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp @@ -42,17 +42,28 @@ int main() { } //----------------------------------------------------------------------------- - // Now the correlation matrix is really the distance matrix and can be processed further. + // Now the correlation matrix is a distance matrix and can be processed further. //----------------------------------------------------------------------------- Distance_matrix distances = correlations; + //------------------------------------------------------------------------------ + //Note that this treshold mean that the points in the distance 1, i.e. corelation + //0 will be connected. + //------------------------------------------------------------------------------ double threshold = 1.0; + + Rips_complex rips_complex_from_points(distances, threshold); Simplex_tree stree; rips_complex_from_points.create_complex(stree, 1); // ---------------------------------------------------------------------------- - // Display information about the one skeleton Rips complex + // Display information about the one skeleton Rips complex. Note that + // the filtration displayed here comes from the distance matrix computed + // above, which is 1 - initial correlation matrix. Only this way, we obtain + // a complex with filtration. If a correlation matrix is used instead, we would + // have a reverse filtration (i.e. filtration of boundary of each simplex S + // is greater or equal to the filtration of S). // ---------------------------------------------------------------------------- std::cout << "Rips complex is of dimension " << stree.dimension() << " - " << stree.num_simplices() << " simplices - " << stree.num_vertices() << " vertices." << std::endl; -- cgit v1.2.3