#18834: Use Sage to compute clustering coefficient
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.8
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  6274bff716b13f4ef7b3e1745d8dcbf761336826
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/18834         |
   Dependencies:         |
  #18811                 |
-------------------------+-------------------------------------------------

Comment (by dcoudert):

 On a clique that's for sure, but on other kinds of graphs...
 {{{
 sage: g = graphs.RandomBarabasiAlbert(1000,2)
 sage: %timeit _=g.clustering_coeff(implementation="boost")
 1000 loops, best of 3: 1.9 ms per loop
 sage: %timeit _=g.clustering_coeff(implementation="dense_copy")
 100 loops, best of 3: 7.34 ms per loop
 sage: %timeit _=g.clustering_coeff(implementation="sparse_copy")
 100 loops, best of 3: 13.9 ms per loop
 sage: %timeit _=g.clustering_coeff(implementation="networkx")
 100 loops, best of 3: 19.3 ms per loop

 sage: g = graphs.RandomBarabasiAlbert(10000,2)
 sage: %timeit _=g.clustering_coeff(implementation="boost")
 10 loops, best of 3: 38 ms per loop
 sage: %timeit _=g.clustering_coeff(implementation="dense_copy")
 10 loops, best of 3: 143 ms per loop
 sage: %timeit _=g.clustering_coeff(implementation="sparse_copy")
 10 loops, best of 3: 148 ms per loop
 sage: %timeit _=g.clustering_coeff(implementation="networkx")
 1 loops, best of 3: 248 ms per loop
 }}}

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