summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-04-22 08:39:03 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-04-22 08:39:03 +0200
commitf4f5992e9025d055e35c86589923f1b0299f552e (patch)
treecda7295aade59f3c8e1a2dbd97fc0123766ab9b1 /src/python
parentc2eb0484191f89fcbe40bc4ab04943eb808f12a9 (diff)
code review: rename block_func when it is a type. Type is a 'callable'
Diffstat (limited to 'src/python')
-rw-r--r--src/python/gudhi/simplex_tree.pxd4
-rw-r--r--src/python/gudhi/simplex_tree.pyx2
-rw-r--r--src/python/include/Simplex_tree_interface.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/python/gudhi/simplex_tree.pxd b/src/python/gudhi/simplex_tree.pxd
index 80c6ffca..ff750af9 100644
--- a/src/python/gudhi/simplex_tree.pxd
+++ b/src/python/gudhi/simplex_tree.pxd
@@ -67,8 +67,8 @@ cdef extern from "Simplex_tree_interface.h" namespace "Gudhi":
Simplex_tree_skeleton_iterator get_skeleton_iterator_begin(int dimension) nogil
Simplex_tree_skeleton_iterator get_skeleton_iterator_end(int dimension) nogil
# Expansion with blockers
- ctypedef bool (*blocker_func)(vector[int], void *user_data)
- void expansion_with_blockers_callback(int dimension, blocker_func user_func, void *user_data)
+ ctypedef bool (*blocker_func_t)(vector[int], void *user_data)
+ void expansion_with_blockers_callback(int dimension, blocker_func_t user_func, void *user_data)
cdef extern from "Persistent_cohomology_interface.h" namespace "Gudhi":
cdef cppclass Simplex_tree_persistence_interface "Gudhi::Persistent_cohomology_interface<Gudhi::Simplex_tree<Gudhi::Simplex_tree_options_full_featured>>":
diff --git a/src/python/gudhi/simplex_tree.pyx b/src/python/gudhi/simplex_tree.pyx
index debe92c0..383d1949 100644
--- a/src/python/gudhi/simplex_tree.pyx
+++ b/src/python/gudhi/simplex_tree.pyx
@@ -428,7 +428,7 @@ cdef class SimplexTree:
:param max_dim: Expansion maximal dimension value.
:type max_dim: int
:param blocker_func: Blocker oracle.
- :type blocker_func: Its concept is `Boolean blocker_func(list of int)`
+ :type blocker_func: Callable[[List[int]], bool]
"""
self.get_ptr().expansion_with_blockers_callback(max_dim, callback, <void*>blocker_func)
diff --git a/src/python/include/Simplex_tree_interface.h b/src/python/include/Simplex_tree_interface.h
index 9f92b349..a859bec0 100644
--- a/src/python/include/Simplex_tree_interface.h
+++ b/src/python/include/Simplex_tree_interface.h
@@ -39,7 +39,7 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> {
using Skeleton_simplex_iterator = typename Base::Skeleton_simplex_iterator;
using Complex_simplex_iterator = typename Base::Complex_simplex_iterator;
using Extended_filtration_data = typename Base::Extended_filtration_data;
- typedef bool (*blocker_func)(Simplex simplex, void *user_data);
+ typedef bool (*blocker_func_t)(Simplex simplex, void *user_data);
public:
@@ -189,7 +189,7 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> {
return collapsed_stree_ptr;
}
- void expansion_with_blockers_callback(int dimension, blocker_func user_func, void *user_data) {
+ void expansion_with_blockers_callback(int dimension, blocker_func_t user_func, void *user_data) {
Base::expansion_with_blockers(dimension, [&](Simplex_handle sh){
Simplex simplex;
for (auto vertex : Base::simplex_vertex_range(sh)) {