summaryrefslogtreecommitdiff
path: root/src/Rips_complex
diff options
context:
space:
mode:
authorpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-11-03 05:10:17 +0000
committerpdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-11-03 05:10:17 +0000
commit0729a55a67503c068e4843c63930d6b29e76f7ac (patch)
tree5084d6162b571f66e39ec8ce1eee36d3f6176cbb /src/Rips_complex
parentaf51e15aadd1c97da1767a2404fd1d60a105c191 (diff)
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
Diffstat (limited to 'src/Rips_complex')
-rw-r--r--src/Rips_complex/example/example_one_skeleton_rips_from_correlation_matrix.cpp15
1 files changed, 13 insertions, 2 deletions
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;