summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-03-25 09:04:27 +0100
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-03-25 09:04:27 +0100
commit98cc06acb5f4b7caf4c23645614a472f7f9b5f3a (patch)
tree23d0973a0a9ba88a4475213a0b662e79eeea9830 /src/python
parent77e577eb28ca7622553cd0527db76d46b473c445 (diff)
Move simplex tree equality operator in another branch
Diffstat (limited to 'src/python')
-rw-r--r--src/python/gudhi/simplex_tree.pxd1
-rw-r--r--src/python/gudhi/simplex_tree.pyx9
-rwxr-xr-xsrc/python/test/test_simplex_tree.py12
3 files changed, 0 insertions, 22 deletions
diff --git a/src/python/gudhi/simplex_tree.pxd b/src/python/gudhi/simplex_tree.pxd
index 2aa435b1..000323af 100644
--- a/src/python/gudhi/simplex_tree.pxd
+++ b/src/python/gudhi/simplex_tree.pxd
@@ -74,7 +74,6 @@ 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
pair[Simplex_tree_boundary_iterator, Simplex_tree_boundary_iterator] get_boundary_iterators(vector[int] simplex) nogil except +
- bint operator==(Simplex_tree_interface_full_featured) nogil
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 b5a938d5..d7991417 100644
--- a/src/python/gudhi/simplex_tree.pyx
+++ b/src/python/gudhi/simplex_tree.pyx
@@ -639,12 +639,3 @@ cdef class SimplexTree:
self.thisptr = <intptr_t>(ptr.collapse_edges(nb_iter))
# Delete old pointer
del ptr
-
- def __eq__(self, other):
- """Simplex tree equality operator using C++ depth first search operator==
-
- :returns: True if the 2 simplex trees are equal, False otherwise.
- :rtype: bool
- """
- cdef intptr_t other_int_ptr=other.thisptr
- return dereference(self.get_ptr()) == dereference(<Simplex_tree_interface_full_featured*>other_int_ptr) \ No newline at end of file
diff --git a/src/python/test/test_simplex_tree.py b/src/python/test/test_simplex_tree.py
index 83b5c268..a3eacaa9 100755
--- a/src/python/test/test_simplex_tree.py
+++ b/src/python/test/test_simplex_tree.py
@@ -404,15 +404,3 @@ def test_boundaries_iterator():
with pytest.raises(RuntimeError):
list(st.get_boundaries([6])) # (6) does not exist
-
-def test_equality_operator():
- st1 = SimplexTree()
- st2 = SimplexTree()
-
- assert st1 == st2
-
- st1.insert([1,2,3], 4.)
- assert st1 != st2
-
- st2.insert([1,2,3], 4.)
- assert st1 == st2