diff options
author | mcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-06-27 01:03:45 +0000 |
---|---|---|
committer | mcarrier <mcarrier@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2018-06-27 01:03:45 +0000 |
commit | d221f79cfb7d84941d791835e52fa4a596269cc6 (patch) | |
tree | cde0df00ef5e7ec21c6a9e123e5d35bd7f5968f3 /src/cython/test/test_cubical_complex.py | |
parent | 0741c3eabbfece1c73ac76aa44adbe2904b6124d (diff) | |
parent | 5645e9fcbe5730462b2befb8685d3bb6857279be (diff) |
merged trunk
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/kernels@3644 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 2be9ba6b6a381e677081a751e7d8f8c1d79385b0
Diffstat (limited to 'src/cython/test/test_cubical_complex.py')
-rwxr-xr-x | src/cython/test/test_cubical_complex.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cython/test/test_cubical_complex.py b/src/cython/test/test_cubical_complex.py index 79d39aa8..92e591e9 100755 --- a/src/cython/test/test_cubical_complex.py +++ b/src/cython/test/test_cubical_complex.py @@ -72,6 +72,17 @@ def test_dimension_simple_constructor(): assert cub.betti_numbers() == [1, 0, 0] assert cub.persistent_betti_numbers(0, 1000) == [0, 0, 0] +def test_user_case_simple_constructor(): + cub = CubicalComplex(dimensions=[3, 3], + top_dimensional_cells = [float('inf'), 0.,0.,0.,1.,0.,0.,0.,0.]) + assert cub.__is_defined() == True + assert cub.__is_persistence_defined() == False + assert cub.persistence() == [(1, (0.0, 1.0)), (0, (0.0, float('inf')))] + assert cub.__is_persistence_defined() == True + other_cub = CubicalComplex(dimensions=[3, 3], + top_dimensional_cells = [1000., 0.,0.,0.,1.,0.,0.,0.,0.]) + assert other_cub.persistence() == [(1, (0.0, 1.0)), (0, (0.0, float('inf')))] + def test_dimension_file_constructor(): # Create test file test_file = open('CubicalOneSphere.txt', 'w') |