diff options
author | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2022-01-21 08:24:16 +0100 |
---|---|---|
committer | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2022-01-21 08:24:16 +0100 |
commit | 854cb0726336013cf9faede10ba61b0c6da938d3 (patch) | |
tree | 2af6906f741904761064349f547811fb85b6000b /src/python/test/test_rips_complex.py | |
parent | a6e7f96f7d2c391e4548309174cc05f5ae05d871 (diff) | |
parent | de5aa9c891ef13c9fc2b2635bcd27ab873b0057b (diff) |
Merge master
Diffstat (limited to 'src/python/test/test_rips_complex.py')
-rwxr-xr-x | src/python/test/test_rips_complex.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/python/test/test_rips_complex.py b/src/python/test/test_rips_complex.py index b86e7498..a2f43a1b 100755 --- a/src/python/test/test_rips_complex.py +++ b/src/python/test/test_rips_complex.py @@ -133,3 +133,24 @@ def test_filtered_rips_from_distance_matrix(): assert simplex_tree.num_simplices() == 8 assert simplex_tree.num_vertices() == 4 + + +def test_sparse_with_multiplicity(): + points = [ + [3, 4], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [0.1, 2], + [3, 4.1], + ] + rips = RipsComplex(points=points, sparse=0.01) + simplex_tree = rips.create_simplex_tree(max_dimension=2) + assert simplex_tree.num_simplices() == 7 + diag = simplex_tree.persistence() |