#18137: Centrality betweenness in Sage
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.6
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  eaa6a3eccacf8f90064cde79febef149c7b8e5e8
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/18137           |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by ncohen):

 Okay, two news:

 1) You are right, when profiling the code on a long path the bottleneck is
 this 'or'

 2) We can have everything at the same time. Instead of clearing the new
 layer bitset and running this big 'or', we can keep adding stuff to it
 without ever clearing it, AND only adding the new elements to the 'seen'
 bitset at the end of the loop (using the content of the queue). 100% win.
 I will upload a commit in a second.

 Nathann

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