summaryrefslogtreecommitdiff
path: root/src/python/example/alpha_complex_from_points_example.py
diff options
context:
space:
mode:
authortlacombe <lacombe1993@gmail.com>2020-03-17 09:28:57 +0100
committertlacombe <lacombe1993@gmail.com>2020-03-17 09:28:57 +0100
commit2de9709b63045c484aa1c53f72c870eb210880d9 (patch)
tree6350e1a4b45634747c4cc49ea53c4eb97af1493c /src/python/example/alpha_complex_from_points_example.py
parent80513805a453fadd137d606f501239de3e1ab12a (diff)
parentbf5873f5dbef29ff9990131c00bdd6d32b7a2f85 (diff)
merging master (including wasserstein distance) into wbary ; modified CMakeList to solve conflicts
Diffstat (limited to 'src/python/example/alpha_complex_from_points_example.py')
-rwxr-xr-xsrc/python/example/alpha_complex_from_points_example.py8
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))