summaryrefslogtreecommitdiff
path: root/src/cython/test/test_cubical_complex.py
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-07-02 09:46:08 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2018-07-02 09:46:08 +0000
commit9d1e8bcf6ee35b25a3e02b47a30a0b3cda89461d (patch)
tree9d8eb7e1bf90e8dcc4c3212cfe28312846391809 /src/cython/test/test_cubical_complex.py
parent4006d0f51dea0bf4234fbdc62b35fe71562293d8 (diff)
parent34d50c272e468e3cf39d18c7e43730274d936acd (diff)
Merge last trunk modifications
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/python_nerve_gic_vincent@3656 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1f02e2f3b3e716d6578be49437e7d0b33fa99e5b
Diffstat (limited to 'src/cython/test/test_cubical_complex.py')
-rwxr-xr-xsrc/cython/test/test_cubical_complex.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cython/test/test_cubical_complex.py b/src/cython/test/test_cubical_complex.py
index 0e81554d..92e591e9 100755
--- a/src/cython/test/test_cubical_complex.py
+++ b/src/cython/test/test_cubical_complex.py
@@ -6,7 +6,7 @@ from gudhi import CubicalComplex
Author(s): Vincent Rouvreau
- Copyright (C) 2016 INRIA
+ Copyright (C) 2016 Inria
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ from gudhi import CubicalComplex
"""
__author__ = "Vincent Rouvreau"
-__copyright__ = "Copyright (C) 2016 INRIA"
+__copyright__ = "Copyright (C) 2016 Inria"
__license__ = "GPL v3"
@@ -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')