diff options
author | Vincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com> | 2020-03-16 19:16:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-16 19:16:34 +0100 |
commit | f40161072b8f74f68b0ff67b6ef2be7abebec950 (patch) | |
tree | 1b72b9bd381f52e578b1a8c889f288bbeb4d5efe /src/python/example/alpha_complex_from_points_example.py | |
parent | 592d58a95dbe5851c9f4ded9e8740c1e7a9c1502 (diff) | |
parent | 6ed2a97421a223b4ebe31b91f48d779c2209f470 (diff) |
Merge pull request #211 from VincentRouvreau/iterator_over_simplex_tree
Iterator over simplex tree
Diffstat (limited to 'src/python/example/alpha_complex_from_points_example.py')
-rwxr-xr-x | src/python/example/alpha_complex_from_points_example.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/python/example/alpha_complex_from_points_example.py b/src/python/example/alpha_complex_from_points_example.py index 844d7a82..73faf17c 100755 --- a/src/python/example/alpha_complex_from_points_example.py +++ b/src/python/example/alpha_complex_from_points_example.py @@ -46,8 +46,14 @@ if simplex_tree.find([4]): else: print("[4] Not found...") +# Some insertions, simplex_tree needs to initialize filtrations +simplex_tree.initialize_filtration() + print("dimension=", simplex_tree.dimension()) -print("filtrations=", simplex_tree.get_filtration()) +print("filtrations=") +for simplex_with_filtration in simplex_tree.get_filtration(): + print("(%s, %.2f)" % tuple(simplex_with_filtration)) + print("star([0])=", simplex_tree.get_star([0])) print("coface([0], 1)=", simplex_tree.get_cofaces([0], 1)) |