summaryrefslogtreecommitdiff
path: root/src/python/test/test_rips_complex.py
diff options
context:
space:
mode:
authorVincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com>2021-06-09 11:50:37 +0200
committerGitHub <noreply@github.com>2021-06-09 11:50:37 +0200
commitbbb0e9841af341882a28624081eac9611ea326c0 (patch)
treed6e0c7266ae0d197ffd1c82d3505cdbcf42b11fd /src/python/test/test_rips_complex.py
parentf1effb5b5bf30275a692b51528ec068f7cef84ab (diff)
parent845b02ff408eb50207165b8e11136e4b1888612a (diff)
Merge branch 'master' into python_weighted_alpha_complex
Diffstat (limited to 'src/python/test/test_rips_complex.py')
-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()