summaryrefslogtreecommitdiff
path: root/src/python/test/test_simplex_tree.py
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-08-18 14:38:31 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-08-18 14:38:31 +0200
commitddb2118f0af865588d7c14b88171dc04bb27c529 (patch)
tree74825f2f0c4e353511bbe09979ff8ae9aabe431d /src/python/test/test_simplex_tree.py
parenta1cd7e9ead030654a1fdb6cfd50408103c458529 (diff)
reset_filtration from a dimension (instead of 'until')
Diffstat (limited to 'src/python/test/test_simplex_tree.py')
-rwxr-xr-xsrc/python/test/test_simplex_tree.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/python/test/test_simplex_tree.py b/src/python/test/test_simplex_tree.py
index 6f1d01cc..ac2b59c7 100755
--- a/src/python/test/test_simplex_tree.py
+++ b/src/python/test/test_simplex_tree.py
@@ -367,15 +367,16 @@ def test_reset_filtration():
assert st.insert([3, 4, 5], 3.) == True
assert st.insert([0, 1, 6, 7], 4.) == True
+ # Guaranteed by construction
for simplex in st.get_simplices():
- assert st.filtration(simplex[0]) >= 0.
+ assert st.filtration(simplex[0]) >= 2.
# dimension until 5 even if simplex tree is of dimension 3 to test the limits
- for dimension in range(0, 6):
+ for dimension in range(5, -1, -1):
st.reset_filtration(0., dimension)
for simplex in st.get_skeleton(3):
print(simplex)
- if len(simplex[0]) > (dimension + 1):
- assert st.filtration(simplex[0]) >= 1.
+ if len(simplex[0]) < (dimension) + 1:
+ assert st.filtration(simplex[0]) >= 2.
else:
assert st.filtration(simplex[0]) == 0.