summaryrefslogtreecommitdiff
path: root/src/cython/test/test_cubical_complex.py
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-05-28 15:45:15 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-05-28 15:45:15 +0000
commitaa12266a274c835adef5950a54ebdaa9fb68b89e (patch)
treeb3b335ec4bf2069c3925c39507c3ad67cd810442 /src/cython/test/test_cubical_complex.py
parent5fd7f8f63704131228a57c6292743295a25db11e (diff)
parenta4cc98d569c63d04729242e1cabe7a0e49ed3908 (diff)
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/cechcomplex_vincent@3479 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 95377921626dc6294d4560571023692567db49b7
Diffstat (limited to 'src/cython/test/test_cubical_complex.py')
-rwxr-xr-xsrc/cython/test/test_cubical_complex.py11
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')