diff options
author | Vincent Rouvreau <10407034+VincentRouvreau@users.noreply.github.com> | 2021-06-09 11:50:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 11:50:37 +0200 |
commit | bbb0e9841af341882a28624081eac9611ea326c0 (patch) | |
tree | d6e0c7266ae0d197ffd1c82d3505cdbcf42b11fd /src/python/test/test_rips_complex.py | |
parent | f1effb5b5bf30275a692b51528ec068f7cef84ab (diff) | |
parent | 845b02ff408eb50207165b8e11136e4b1888612a (diff) |
Merge branch 'master' into python_weighted_alpha_complex
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() |