summaryrefslogtreecommitdiff
path: root/src/cython/example/Alpha_complex_example.py
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-05-25 09:42:09 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-05-25 09:42:09 +0000
commita232e35a50e02fc479509e8fda45c16da5032740 (patch)
treeab06ab95d32d2a0974003ac885073085fc563e07 /src/cython/example/Alpha_complex_example.py
parentd101d16e7ebc4614389bbbf162133b27207f2cf4 (diff)
PEP8 conformity
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/ST_cythonize@1195 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 8d2e24e07694508853feb677e5fd2294a663a2d5
Diffstat (limited to 'src/cython/example/Alpha_complex_example.py')
-rwxr-xr-xsrc/cython/example/Alpha_complex_example.py38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/cython/example/Alpha_complex_example.py b/src/cython/example/Alpha_complex_example.py
index cf5eed55..a724b0c4 100755
--- a/src/cython/example/Alpha_complex_example.py
+++ b/src/cython/example/Alpha_complex_example.py
@@ -2,44 +2,44 @@
import gudhi
-print("#######################################################################")
+print("#####################################################################")
print("AlphaComplex creation from points")
-alpha_complex = gudhi.AlphaComplex(points=[[0,0],[1,0],[0,1],[1,1]], max_alpha_square=60.0)
+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 !!")
+if alpha_complex.find([0, 1]):
+ print("[0, 1] Found !!")
else:
- print("[0,1] Not found...")
+ print("[0, 1] Not found...")
if alpha_complex.find([4]):
- print("[4] Found !!")
+ print("[4] Found !!")
else:
- print("[4] Not found...")
+ print("[4] Not found...")
-if alpha_complex.insert([0,1,2], filtration=4.0):
- print("[0,1,2] Inserted !!")
+if alpha_complex.insert([0, 1, 2], filtration=4.0):
+ print("[0, 1, 2] Inserted !!")
else:
- print("[0,1,2] Not inserted...")
+ print("[0, 1, 2] Not inserted...")
-if alpha_complex.insert([0,1,4], filtration=4.0):
- print("[0,1,4] Inserted !!")
+if alpha_complex.insert([0, 1, 4], filtration=4.0):
+ print("[0, 1, 4] Inserted !!")
else:
- print("[0,1,4] Not inserted...")
+ print("[0, 1, 4] Not inserted...")
if alpha_complex.find([4]):
- print("[4] Found !!")
+ print("[4] Found !!")
else:
- print("[4] Not found...")
+ 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("coface([0], 1)=", alpha_complex.get_coface_tree([0], 1))
print("point[0]=", alpha_complex.get_point(0))
print("point[5]=", alpha_complex.get_point(5))
alpha_complex.initialize_filtration()
-print("persistence(2)=", alpha_complex.persistence(2))
-
-print("#######################################################################")
+print("persistence(2)=", alpha_complex.persistence(homology_coeff_field=2,
+ min_persistence=0))