Skip to content

Commit 06fa3aa

Browse files
committed
Various improvements
Remove `_find` & `_union`. Remove `DisjointSet_of_integers` `_d` attribute from `DisjointSet_of_hashables` (and adjust code). Add notes recommending `OP_find` and `OP_union` if no input checking needed. Touch-up docstrings.
1 parent 245fcb1 commit 06fa3aa

File tree

2 files changed

+85
-129
lines changed

2 files changed

+85
-129
lines changed

src/sage/sets/disjoint_set.pxd

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ cdef class DisjointSet_class(SageObject):
2222
cdef class DisjointSet_of_integers(DisjointSet_class):
2323
cpdef int find(self, int i)
2424
cpdef void union(self, int i, int j)
25-
cdef inline int _find(self, int i)
26-
cdef inline void _union(self, int i, int j)
2725
cpdef root_to_elements_dict(self)
2826
cpdef element_to_root_dict(self)
2927
cpdef to_digraph(self)
3028

3129
cdef class DisjointSet_of_hashables(DisjointSet_class):
3230
cdef list _int_to_el
3331
cdef dict _el_to_int
34-
cdef DisjointSet_of_integers _d
3532
cpdef find(self, e)
3633
cpdef void union(self, e, f)
3734
cpdef root_to_elements_dict(self)

0 commit comments

Comments
 (0)