#18811: Boost Clustering Coefficient
-------------------------------------+-------------------------------------
       Reporter:  borassi            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  graph theory       |   Resolution:
       Keywords:  Local clustering   |    Merged in:
  coefficient, Boost                 |    Reviewers:
        Authors:  Michele Borassi    |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  99bd994335f70455d898c83f1a13b3d38e8f5064
  u/borassi/boost_clustering_coefficient|     Stopgaps:
   Dependencies:  18564              |
-------------------------------------+-------------------------------------
Changes (by borassi):

 * status:  needs_work => needs_review


Comment:

 Helloooooooo!

 >
 > - About `boost_clustering_coeff` -- to me it makes more sense if this
 function,
 > meant to apply to a boost graph, does not take a Sage graph as input.
 You only
 > need it to get the vertices' correct label, but you only need this at a
 higher
 > level. Returning a dictionary associating the coeffcient to each
 (integer)
 > vertex is not very expensive considering the computations you do, and so
 you
 > can afford to relabel it higher.

 Oops, I wrote it like this to test if it worked, and I forgot to change
 it. By solving this issue, I also have found problems if the vertex label
 is not an integer, I corrected it, and I added a doctest.

 >
 > - Could you define "local clustering" somewhere? Is it any different
 from the
 > 'clustering coefficient of a vertex'?

 It is exactly the same
 
(https://en.wikipedia.org/wiki/Clustering_coefficient#Local_clustering_coefficient):
 I decided to remove "local" from all comments.

 >
 > - Could you add an INPUT block to `cpdef clustering_coeff`?

 Done!

 > - Same function -- by using a `sig_check` instead of `sig_on/off` it is
 > impossible to interrupt the function while `boost_resulting_coeff` is
 > running. It will only be interrupted when the function returns.

 Done! Now I use sig_on/off.

 > - Could you rename 'cc' to 'average_clustering_coefficient'? When you
 need a
 > comment to say what a variable is, it often means that you should rename
 the
 > variable.

 Done!

 > - in `clustering_average` -- could you document the default behaviour of
 > `implementation=None`? (you did it in `clustering_coeff` already).

 Done

 > - You should not indent the *text* after a 'TESTS:' block (like it is
 done for
 > 'INPUT:'). Usually, you only need to indent text in the documentation
 after a
 > '::'.

 Done!

 > - Instead of `weight==False`, it is better to use 'not weight'. Handles
 better
 > something like `weight=0` (faster to type `:-P`)

 Done!

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