summaryrefslogtreecommitdiff
path: root/src/cython/test/test_persistence_representations_intervals.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/cython/test/test_persistence_representations_intervals.py')
-rwxr-xr-xsrc/cython/test/test_persistence_representations_intervals.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cython/test/test_persistence_representations_intervals.py b/src/cython/test/test_persistence_representations_intervals.py
index 794cf49d..a8f3686e 100755
--- a/src/cython/test/test_persistence_representations_intervals.py
+++ b/src/cython/test/test_persistence_representations_intervals.py
@@ -41,28 +41,28 @@ def test_check_length_of_dominant_intervals():
assert dominant_ten_intervals_length == dominant_intervals_length_
-def check_dominant_intervals():
+def test_check_dominant_intervals():
p = gudhi.PersistenceIntervals(None,None,"data/file_with_diagram");
ten_dominant_intervals = p.dominant_intervals(10);
templ = [ (0.114718, 0.977343) , (0.133638, 0.93453) , (0.104599, 0.866659) , (0.149798, 0.906299), (0.247352, 0.976719) , (0.192675, 0.910852) , (0.191836, 0.900231) , (0.284998, 0.987842) , (0.294069, 0.994537), (0.267421, 0.889597)]
assert fabs(ten_dominant_intervals - templ) <= epsilon
-def check_histogram_of_lengths():
+def test_check_histogram_of_lengths():
p = gudhi.PersistenceIntervals(None,None,"data/file_with_diagram")
histogram = p.histogram_of_lengths(10);
template_histogram = [10,5,3,4,4,3,6,1,7,1,1]
assert fabs(histogram - template_histogram) <= epsilon
-def check_cumulative_histograms_of_lengths():
+def test_check_cumulative_histograms_of_lengths():
p = gudhi.PersistenceIntervals(None,None,"data/file_with_diagram")
cumulative_histogram = p.cumulative_histogram_of_lengths(10)
template_cumulative_histogram = [10,15,18,22,26,29,35,36,43,44,45]
assert fabs(cumulative_histogram - template_cumulative_histogram) <= epsilon
-def check_characteristic_function_of_diagram():
+def test_check_characteristic_function_of_diagram():
p = gudhi.PersistenceIntervals(None,None,"data/file_with_diagram")
min_max_ = p.get_x_range();
char_funct_diag = p.characteristic_function_of_diagram(min_max_[0], min_max_[1]);
@@ -70,7 +70,7 @@ def check_characteristic_function_of_diagram():
assert fabs(char_funct_diag - template_char_funct_diag) <= 0.0001
-def check_cumulative_characteristic_function_of_diagram():
+def test_check_cumulative_characteristic_function_of_diagram():
p = gudhi.PersistenceIntervals(None,None,"data/file_with_diagram")
min_max_ = p.get_x_range()
cumul_char_funct_diag = p.cumulative_characteristic_function_of_diagram(min_max_.first, min_max_.second,None);
@@ -78,7 +78,7 @@ def check_cumulative_characteristic_function_of_diagram():
assert fabs(cumul_char_funct_diag - template_char_funct_diag_cumul) <= 0.0001
-def check_compute_persistent_betti_numbers():
+def test_check_compute_persistent_betti_numbers():
p = gudhi.PersistenceIntervals(None,None,"data/file_with_diagram")
pbns = [(0.0290362, 1),(0.0307676, 2),(0.0366312, 3),(0.0544614, 4),(0.0920033, 5),(0.104599, 6),(0.114718, 7),(0.117379, 8),(0.123493, 9),(0.133638, 10)(0.137798, 9),(0.149798, 10),(0.155421, 11),(0.158443, 12)(0.176956, 13),(0.183234, 12),(0.191069, 13),(0.191333, 14),(0.191836, 15),(0.192675, 16),(0.208564, 17),(0.218425, 18),(0.219902, 17),(0.23233, 16),(0.234558, 17),(0.237166, 16),(0.247352, 17),(0.267421, 18),(0.268093, 19),(0.278734, 18),(0.284722, 19),(0.284998, 20),(0.294069, 21),(0.306293, 22),(0.322361, 21),(0.323152, 22),(0.371021, 23),(0.372395, 24),(0.387744, 25),(0.435537, 26),(0.462911, 25),(0.483569, 26),(0.489209, 25),(0.517115, 24),(0.522197, 23),(0.532665, 22),(0.545262, 23),(0.587227, 22),(0.593036, 23),(0.602647, 24),(0.605044, 25),(0.621962, 24),(0.629449, 23),(0.636719, 22),(0.64957, 21),(0.650781, 22),(0.654951, 23),(0.683489, 24),(0.687172, 23),(0.69703, 22),(0.701174, 21),(0.717623, 22),(0.722023, 21),(0.722298, 20),(0.725347, 19),(0.73071, 18),(0.758355, 17),(0.770913, 18),(0.790833, 17),(0.821211, 16),(0.849305, 17),(0.853669, 16),(0.866659, 15),(0.872896, 16),(0.889597, 15),(0.900231, 14),(0.903847, 13),(0.906299, 12),(0.910852, 11),(0.93453, 10),(0.944757, 9),(0.947812, 8),(0.959154, 7),(0.975654, 6),(0.976719, 5),(0.977343, 4),(0.980129, 3),(0.987842, 2),(0.990127, 1),(0.994537, 0)]
pbns_new = p.compute_persistent_betti_numbers();