diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-05-13 16:26:46 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-05-13 16:26:46 +0000 |
commit | 1260fc74aeb7c4f82af913388dda0cf0d54dba07 (patch) | |
tree | ad4e7b1bedeedfb1d56a04e3423f2883b99f2dcc /src/cython/example | |
parent | 5056cf3b1626a04879f637d5bce9af61080e8950 (diff) |
Alpha complex without get_point (still bugging)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1175 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: f6e9487d9b129adebda64089ba5590b2f9b9f5e7
Diffstat (limited to 'src/cython/example')
-rwxr-xr-x | src/cython/example/Alpha_complex_example.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/cython/example/Alpha_complex_example.py b/src/cython/example/Alpha_complex_example.py new file mode 100755 index 00000000..5403fc17 --- /dev/null +++ b/src/cython/example/Alpha_complex_example.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python + +import gudhi + +print("#######################################################################") +print("AlphaComplex creation from points") +alpha_complex = gudhi.AlphaComplex(points=[[0,0],[1,0],[0,1],[1,1]], max_alpha_square=60.0) + +if alpha_complex.find([0,1]): + print("[0,1] Found !!") +else: + print("[0,1] Not found...") + +if alpha_complex.find([4]): + print("[4] Found !!") +else: + print("[4] Not found...") + +if alpha_complex.insert([0,1,2], filtration=4.0): + print("[0,1,2] Inserted !!") +else: + print("[0,1,2] Not inserted...") + +if alpha_complex.insert([0,1,4], filtration=4.0): + print("[0,1,4] Inserted !!") +else: + print("[0,1,4] Not inserted...") + +if alpha_complex.find([4]): + print("[4] Found !!") +else: + print("[4] Not found...") + +print("dimension=", alpha_complex.dimension()) +print("filtered_tree=", alpha_complex.get_filtered_tree()) +print("star([0])=", alpha_complex.get_star_tree([0])) +print("coface([0],1)=", alpha_complex.get_coface_tree([0], 1)) + + +print("#######################################################################") |