#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 dcoudert):

 Something is wrong here
 {{{
 +            try:
 +                v_iter = iter(vert)
 +            except TypeError:
 +                v_iter = [v_iter]
 +                v_iter = iter(vert)
 }}}
 I assume you want first to have `v_vert = iter(list(vert))

 The default of calling `distances =
 self.shortest_path_all_pairs(by_weight,algorithm, weight_function,
 check_weight)[0]` is that you get a dictionary of dictionary, that is a
 huge data structure for large graphs (lost of memory and long to create).
 At least the second part of this method should be cythonized to get the
 array of distances, as is done for `centrality_betweenness`.

 David.

--
Ticket URL: <http://trac.sagemath.org/ticket/19007#comment:8>
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.

Reply via email to