#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: | c84caef2c24cf2a42bf802c6d2e829886fd74149
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
public/18137 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
Hello,
> Well, it seems you have already done it! :-)
Well.. Three lines of code for an "all-cases improvement" and an order of
magnitude for the worst case... Of course `:-P`
> My point is that I do not like the nested loops:
> I would rather use only the `while` loop, by replacing `j` with
`layer_current_beginning`, and adding `layer_current_beginning++` at the
end of the `while`. However, I realize now that, if you do not want to
store distances, this is probably not possible, because you have two `for`
loops. So, maybe the best is to leave it as it is.
Yep yep, I am forced to do that if I want to know where exactly I am
without storing distances `^^;`
> That's what I meant, but if you think it's not worth doing it, no
problem!
I just looked at this explanation, and I do not see any way to hint at it
(without saying the obvious 'if the sum is empty, well, it's zero').
SOooooo I will pass.
Thanks again for the speedup,
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18137#comment:36>
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.