#10886: DisjointSet: number of sets function
-----------------------------+----------------------------------------------
Reporter: rlm | Owner: jason
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: misc | Keywords:
Author: Robert Miller | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by abmasse):
Hi, Robert!
I just took a look at your patch. Two remarks and a question:
#. The function `number_of_sets` you added is only defined for the
`DisjointSet_of_integers` class. You should add it as well to the
`DisjointSet_of_hashables`.
#. While you're at it, I suggest the name `number_of_subsets` instead of
`number_of_sets`, since we talk about partitioning a set into disjoint
subsets. It follows the terminology used in the first line of Wikipedia
(http://en.wikipedia.org/wiki/Disjoint-set_data_structure).
#. My question is mainly addressed to Sébastien but maybe you know the
answer. What is the reason for creating the class `DisjointSet_class`? It
says that it is supposed to contain functions common to all disjoint set
data structures, but it only contains two basic functions. Shouln't
functions such as `cardinality`, `number_of_sets`, etc. be there too?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10886#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.