summaryrefslogtreecommitdiff
path: root/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py')
-rwxr-xr-xsrc/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py b/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py
index d74eba57..40d06f93 100755
--- a/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py
+++ b/src/cython/example/alpha_complex_diagram_persistence_from_off_file_example.py
@@ -52,15 +52,17 @@ with open(args.file, 'r') as f:
message = "AlphaComplex with max_edge_length=" + repr(args.max_alpha_square)
print(message)
- alpha_complex = gudhi.AlphaComplex(off_file=args.file, max_alpha_square=args.max_alpha_square)
+ alpha_complex = gudhi.AlphaComplex(off_file=args.file)
+ simplex_tree = gudhi.SimplexTree()
+ alpha_complex.create_simplex_tree(simplex_tree, max_alpha_square=args.max_alpha_square)
- message = "Number of simplices=" + repr(alpha_complex.num_simplices())
+ message = "Number of simplices=" + repr(simplex_tree.num_simplices())
print(message)
- diag = alpha_complex.persistence()
+ diag = simplex_tree.persistence()
print("betti_numbers()=")
- print(alpha_complex.betti_numbers())
+ print(simplex_tree.betti_numbers())
if args.no_diagram == False:
gudhi.diagram_persistence(diag)