diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-30 10:33:56 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-30 10:33:56 +0000 |
commit | d7d59f1e4245af3595c8eafd0abc0abdc4b5805d (patch) | |
tree | bef4d3b905d018d15609e5c35c61412fe1b6dcaa /src/cython/doc | |
parent | 97d80185d6ec4d5e8f81b4cd4936d29a6d63b05b (diff) |
Doc, examples and tests updates for tangential
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1805 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 56d080f79a7a0c3b6eb3ed38b376e899cb17c8f9
Diffstat (limited to 'src/cython/doc')
-rw-r--r-- | src/cython/doc/tangential_complex_user.rst | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/cython/doc/tangential_complex_user.rst b/src/cython/doc/tangential_complex_user.rst index 33c03e34..30c97b8f 100644 --- a/src/cython/doc/tangential_complex_user.rst +++ b/src/cython/doc/tangential_complex_user.rst @@ -111,12 +111,12 @@ itself and/or after the perturbation process. Simple example -------------- -This example builds the Tangential complex of point set. +This example builds the Tangential complex of point set read in an OFF file. .. testcode:: import gudhi - tc = gudhi.TangentialComplex(points=[[1, 1], [7, 0], [4, 6], [9, 6], [0, 14], [2, 19], [9, 17]]) + tc = gudhi.TangentialComplex(off_file='alphacomplexdoc.off') result_str = 'Tangential contains ' + repr(tc.num_simplices()) + \ ' simplices - ' + repr(tc.num_vertices()) + ' vertices.' print(result_str) @@ -169,11 +169,24 @@ This example builds the Tangential complex of a point set, then tries to solve inconsistencies by perturbing the positions of points involved in inconsistent simplices. -testcode:: +.. testcode:: import gudhi - tc = gudhi.TangentialComplex(points=[[1, 1], [7, 0], [4, 6], [9, 6], [0, 14], [2, 19], [9, 17]]) + tc = gudhi.TangentialComplex(points=[[0.0, 0.0], [1.0, 0.0], [0.0, 1.0], [1.0, 1.0]]) + result_str = 'Tangential contains ' + repr(tc.num_vertices()) + ' vertices.' + print(result_str) + + if tc.num_inconsistent_simplices() > 0: + print('Tangential contains inconsistencies.') + + tc.fix_inconsistencies_using_perturbation(10, 60) + if tc.num_inconsistent_simplices() == 0: + print('Inconsistencies has been fixed.') The output is: -testoutput:: +.. testoutput:: + + Tangential contains 4 vertices. + Tangential contains inconsistencies. + Inconsistencies has been fixed. |