diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2018-06-15 12:34:03 +0200 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2018-06-15 12:34:03 +0200 |
commit | 41482b4260b4aff3d6803e340d5c94fbefb9af67 (patch) | |
tree | 89eae43dcb3fd4ab040e96f3d5479427d8cd2c7f /cython/test/test_cubical_complex.py | |
parent | 41a1b8c2728e212c832c0384c8bb424139a247cf (diff) | |
parent | c524232f734de875d69e2f190f01a6c976024368 (diff) |
Merge branch 'upstream/latest' into dfsg/latest
Diffstat (limited to 'cython/test/test_cubical_complex.py')
-rwxr-xr-x | cython/test/test_cubical_complex.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/cython/test/test_cubical_complex.py b/cython/test/test_cubical_complex.py index 0e81554d..92e591e9 100755 --- a/cython/test/test_cubical_complex.py +++ b/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') |