#18864: New method for the eccentricity of undirected graphs
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  dcoudert               |       Status:  needs_review
           Type:         |    Milestone:  sage-6.8
  enhancement            |   Resolution:
       Priority:  minor  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:  David  |  f621777db49299ce66bf8663795ad79453d4e43e
  Coudert                |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/18864           |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by borassi):

 Hello!

 I am a bit puzzled by the use of bitset (probably because I know very
 little about it). You use the same bitset both for the BFS and to keep
 track of vertices in W. Hence, if the graph is connected, when you perform
 `while w!=-1:` the bitset contains everything and you iterate over all
 vertices. Why don't you simply use `for w in range(n):`? You can then
 replace the outer while loop with `while next_v!=UINT32_MAX:`, I think.

 Otherwise, maybe you should use two different bitsets.

 Am I missing something?

 Michele

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