#18864: New method for the eccentricity
-----------------------------+---------------------------------
   Reporter:  dcoudert       |            Owner:
       Type:  PLEASE CHANGE  |           Status:  new
   Priority:  minor          |        Milestone:  sage-6.8
  Component:  graph theory   |         Keywords:
  Merged in:                 |          Authors:  David Coudert
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:
   Stopgaps:                 |
-----------------------------+---------------------------------
 This patch implements the algorithm proposed in [1] for computing the
 eccentricity of all vertices. It can be faster than the standard
 algorithm.

 {{{
 sage: from sage.graphs.distances_all_pairs import eccentricity
 sage: G = graphs.PetersenGraph()
 sage: %time _= eccentricity(G, method='standard')
 CPU times: user 299 µs, sys: 75 µs, total: 374 µs
 Wall time: 361 µs
 sage: %time _= eccentricity(G, method='bounds')
 CPU times: user 218 µs, sys: 29 µs, total: 247 µs
 Wall time: 235 µs
 sage: G = graphs.RandomBarabasiAlbert(10000,2)
 sage: %time _= eccentricity(G, method='standard')
 CPU times: user 2.78 s, sys: 7.8 ms, total: 2.78 s
 Wall time: 2.79 s
 sage: %time _= eccentricity(G, method='bounds')
 CPU times: user 1.66 s, sys: 8.06 ms, total: 1.67 s
 Wall time: 1.67 s
 }}}


 [1] F. W. Takes and W. A. Kosters. Computing the eccentricity distribution
 of large graphs. *Algorithms* 6:100-118 (2013)
 http://dx.doi.org/10.3390/a6010100

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