summaryrefslogtreecommitdiff
path: root/src/cython/doc/alpha_complex_user.rst
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-11-25 16:00:19 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-11-25 16:00:19 +0000
commitaf146a2e48c16855355ac599cbc617250727d244 (patch)
treebab3117c6886f41ec9d2a1869bc70105ecdd63b3 /src/cython/doc/alpha_complex_user.rst
parentf843ef3f8e4ab4ce94a28ded6d8cafd37f2b2311 (diff)
Add of tangential complex doc
Separate simplex tree from alpha complex git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1788 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1cf4a35e0a099501eb1cb6b9809041dd1a1e2617
Diffstat (limited to 'src/cython/doc/alpha_complex_user.rst')
-rw-r--r--src/cython/doc/alpha_complex_user.rst39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/cython/doc/alpha_complex_user.rst b/src/cython/doc/alpha_complex_user.rst
index b6b6e550..5ad3a9e7 100644
--- a/src/cython/doc/alpha_complex_user.rst
+++ b/src/cython/doc/alpha_complex_user.rst
@@ -22,15 +22,17 @@ This example builds the Delaunay triangulation from the given points, and initia
.. testcode::
- import gudhi
- alpha_complex = gudhi.AlphaComplex(points=[[1, 1], [7, 0], [4, 6], [9, 6], [0, 14], [2, 19], [9, 17]],
- max_alpha_square=60.0)
- result_str = 'Alpha complex is of dimension ' + repr(alpha_complex.dimension()) + ' - ' + \
- repr(alpha_complex.num_simplices()) + ' simplices - ' + \
- repr(alpha_complex.num_vertices()) + ' vertices.'
- print(result_str)
- for fitered_value in alpha_complex.get_filtered_tree():
- print(fitered_value)
+ import gudhi
+ alpha_complex = gudhi.AlphaComplex(points=[[1, 1], [7, 0], [4, 6], [9, 6], [0, 14], [2, 19], [9, 17]])
+
+ simplex_tree = gudhi.SimplexTree()
+ alpha_complex.create_simplex_tree(simplex_tree, max_alpha_square=60.0)
+ result_str = 'Alpha complex is of dimension ' + repr(simplex_tree.dimension()) + ' - ' + \
+ repr(simplex_tree.num_simplices()) + ' simplices - ' + \
+ repr(simplex_tree.num_vertices()) + ' vertices.'
+ print(result_str)
+ for fitered_value in simplex_tree.get_filtered_tree():
+ print(fitered_value)
The output is:
@@ -152,15 +154,16 @@ Then, it is asked to display information about the alpha complex:
.. testcode::
- import gudhi
- alpha_complex = gudhi.AlphaComplex(off_file='alphacomplexdoc.off',
- max_alpha_square=59.0)
- result_str = 'Alpha complex is of dimension ' + repr(alpha_complex.dimension()) + ' - ' + \
- repr(alpha_complex.num_simplices()) + ' simplices - ' + \
- repr(alpha_complex.num_vertices()) + ' vertices.'
- print(result_str)
- for fitered_value in alpha_complex.get_filtered_tree():
- print(fitered_value)
+ import gudhi
+ alpha_complex = gudhi.AlphaComplex(off_file='alphacomplexdoc.off')
+ simplex_tree = gudhi.SimplexTree()
+ alpha_complex.create_simplex_tree(simplex_tree, max_alpha_square=59.0)
+ result_str = 'Alpha complex is of dimension ' + repr(simplex_tree.dimension()) + ' - ' + \
+ repr(simplex_tree.num_simplices()) + ' simplices - ' + \
+ repr(simplex_tree.num_vertices()) + ' vertices.'
+ print(result_str)
+ for fitered_value in simplex_tree.get_filtered_tree():
+ print(fitered_value)
the program output is: