summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2021-04-24 12:11:45 +0200
committerGitHub <noreply@github.com>2021-04-24 12:11:45 +0200
commit73cbc900975f8925cb1e2f2dc9cdd8820e17c9bd (patch)
tree6b8c5680791690502a5d78835c1b1a3f6c077b05 /src/python
parentf21240a4c4e0fad25193dc0d409deee9715e0aae (diff)
parent33cb5826e62abf8dd84d2adb59d99fc1f54a2aa1 (diff)
Merge pull request #476 from mglisse/far
Sparse Rips and choose_n_farthest_points, fix #456
Diffstat (limited to 'src/python')
-rwxr-xr-xsrc/python/test/test_rips_complex.py21
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()