summaryrefslogtreecommitdiff
path: root/src/Cech_complex/example/cech_complex_example_from_points.cpp
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-03-05 13:38:57 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-03-05 13:38:57 +0000
commitb3a64294af818c977804c4b67a317782d872e2b5 (patch)
tree5877d208013369a58c71ae7128ae9292424e7a10 /src/Cech_complex/example/cech_complex_example_from_points.cpp
parent3cd1e01f0b0d4fdb46f49ec640c389374ca2fe70 (diff)
Fix doc and tests
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3262 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: c76eb981f5960938221aa2498cb87b0707391733
Diffstat (limited to 'src/Cech_complex/example/cech_complex_example_from_points.cpp')
-rw-r--r--src/Cech_complex/example/cech_complex_example_from_points.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/Cech_complex/example/cech_complex_example_from_points.cpp b/src/Cech_complex/example/cech_complex_example_from_points.cpp
index 97327e69..3b889d56 100644
--- a/src/Cech_complex/example/cech_complex_example_from_points.cpp
+++ b/src/Cech_complex/example/cech_complex_example_from_points.cpp
@@ -15,22 +15,26 @@ int main() {
using Cech_complex = Gudhi::cech_complex::Cech_complex<Simplex_tree, Point_cloud>;
Point_cloud points;
- points.push_back({0., 0.});
- points.push_back({0., 2.});
- points.push_back({std::sqrt(3.), 1.});
- points.push_back({1., 0.});
- points.push_back({1., 2.});
- points.push_back({1. - std::sqrt(3.), 1.});
+ points.push_back({1., 0.}); // 0
+ points.push_back({0., 1.}); // 1
+ points.push_back({2., 1.}); // 2
+ points.push_back({3., 2.}); // 3
+ points.push_back({0., 3.}); // 4
+ points.push_back({3. + std::sqrt(3.), 3.}); // 5
+ points.push_back({1., 4.}); // 6
+ points.push_back({3., 4.}); // 7
+ points.push_back({2., 4. + std::sqrt(3.)}); // 8
+ points.push_back({0., 4.}); // 9
+ points.push_back({-0.5, 2.}); // 10
// ----------------------------------------------------------------------------
// Init of a Cech complex from points
// ----------------------------------------------------------------------------
- // 5. is a magic number to force one blocker, and one non-blocker
- Filtration_value max_radius = 12.;
+ Filtration_value max_radius = 1.;
Cech_complex cech_complex_from_points(points, max_radius);
Simplex_tree stree;
- cech_complex_from_points.create_complex(stree, -1);
+ cech_complex_from_points.create_complex(stree, 2);
// ----------------------------------------------------------------------------
// Display information about the one skeleton Cech complex
// ----------------------------------------------------------------------------