From 1260fc74aeb7c4f82af913388dda0cf0d54dba07 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 13 May 2016 16:26:46 +0000 Subject: 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 --- src/cython/example/Alpha_complex_example.py | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 src/cython/example/Alpha_complex_example.py (limited to 'src/cython/example') 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("#######################################################################") -- cgit v1.2.3