#19007: Refactor Closeness Centrality
-------------------------------------+-------------------------------------
Reporter: borassi | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.9
Component: graph theory | Resolution:
Keywords: Closeness | Merged in:
centrality | Reviewers:
Authors: Michele Borassi | Work issues:
Report Upstream: N/A | Commit:
Branch: | a19addbd50db4086adbfc88c29b5c01f368dabc6
u/borassi/refactor_centrality_closeness| Stopgaps:
Dependencies: #18931, #18876, |
#18910 |
-------------------------------------+-------------------------------------
Comment (by borassi):
Hello!
Thank you for the comment, I will try to address the main issue in the
following.
I have put everything in a single commit, which simply removes the
closeness centrality routine from `graph.py` and rewrites it in
`generic_graph.py`. Now the ticket should be much easier to review. Since
closeness centrality highly depends on shortest paths, the new routine
follows all conventions in ticket #18931.
About the creation of a new file: we already have file `centrality.pyx`,
containing fast algorithms for betweenness centrality. However, these
routines are called from a `centrality_betweenness` routine in file
`generic_graph.py`, which should be used by the user. In this ticket, I
just copied this policy.
In my opinion, if we want to create a new file, we should at least move
also betweenness centrality and degree centrality: in my opinion, this
goes beyond the scope of this ticket. Do you agree?
Best,
Michele
Replying to [comment:4 dcoudert]:
> I don't really understand what you are doing in this commit
>
http://git.sagemath.org/sage.git/commit/?h=5c85793ccb8234ac668173620523f45dbae4b985
>
> In the ticket description you say that you will move everything in
`generic_graph`, but it might be more readable/clean to create a new file
for centrality measures, no?
> Also, you moved only references to the methods, right? (or the
modifications are hidden in the merge with #18931).
> {{{
> + - :meth:`~sage.graphs.graph.Graph.centrality_degree`
> + - :meth:`~centrality_betweenness`
> }}}
>
> David.
--
Ticket URL: <http://trac.sagemath.org/ticket/19007#comment:7>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.