summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h4
-rwxr-xr-xsrc/cython/test/test_simplex_tree.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index 8a827086..a2febe54 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -1202,7 +1202,7 @@ class Simplex_tree {
*/
bool automatic_dimension_set() {
int new_dimension = -1;
- // Browse the tree from te left to the right as higher dimension cells are more likely on the left part of the tree
+ // Browse the tree from the left to the right as higher dimension cells are more likely on the left part of the tree
for (Simplex_handle sh : skeleton_simplex_range(dimension_)) {
#ifdef DEBUG_TRACES
for (auto vertex : simplex_vertex_range(sh)) {
@@ -1215,7 +1215,7 @@ class Simplex_tree {
if (sh_dimension >= dimension_)
// Stop browsing as soon as the dimension is reached, no need to go furter
return false;
- new_dimension = std::max<int>(new_dimension, sh_dimension);
+ new_dimension = std::max(new_dimension, sh_dimension);
}
dimension_ = new_dimension;
return true;
diff --git a/src/cython/test/test_simplex_tree.py b/src/cython/test/test_simplex_tree.py
index a6d6a9f3..177cfdad 100755
--- a/src/cython/test/test_simplex_tree.py
+++ b/src/cython/test/test_simplex_tree.py
@@ -94,12 +94,12 @@ def test_insertion():
assert st.persistence(persistence_dim_max = True) == [(1, (4.0, float('inf'))), (0, (0.0, float('inf')))]
assert st.__is_persistence_defined() == True
- assert st.betti_numbers() == [1, 1]
- assert st.persistent_betti_numbers(-0.1, 10000.0) == [0, 0]
- assert st.persistent_betti_numbers(0.0, 10000.0) == [1, 0]
- assert st.persistent_betti_numbers(3.9, 10000.0) == [1, 0]
- assert st.persistent_betti_numbers(4.0, 10000.0) == [1, 1]
- assert st.persistent_betti_numbers(9999.0, 10000.0) == [1, 1]
+ assert st.betti_numbers() == [1, 1, 0]
+ assert st.persistent_betti_numbers(-0.1, 10000.0) == [0, 0, 0]
+ assert st.persistent_betti_numbers(0.0, 10000.0) == [1, 0, 0]
+ assert st.persistent_betti_numbers(3.9, 10000.0) == [1, 0, 0]
+ assert st.persistent_betti_numbers(4.0, 10000.0) == [1, 1, 0]
+ assert st.persistent_betti_numbers(9999.0, 10000.0) == [1, 1, 0]
def test_expansion():
st = SimplexTree()