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

 > Something is wrong here
 > {{{
 > +            try:
 > +                v_iter = iter(vert)
 > +            except TypeError:
 > +                v_iter = [v_iter]
 > +                v_iter = iter(vert)
 > }}}

 +1.

 In some cases a vertex can be a pair, and thus is iterable. This would
 react badly with this code.

 {{{
 sage: g=graphs.KneserGraph(5,2)
 sage: v=g.vertices()[0]
 sage: g.centrality_closeness(v)
 <crash>
 }}}

 Nathann

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