#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: | 283c61be9357902ff555843b27c0ffed6fed6ea4
u/borassi/boost_clustering_coefficient| Stopgaps:
Dependencies: 18564 |
-------------------------------------+-------------------------------------
Comment (by ncohen):
Hellooooooo Michele,
- 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.
- Could you define "local clustering" somewhere? Is it any different from
the
'clustering coefficient of a vertex'?
- Could you add an INPUT block to `cpdef clustering_coeff`?
- 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.
- 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.
- in `clustering_average` -- could you document the default behaviour of
`implementation=None`? (you did it in `clustering_coeff` already).
- 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
'::'.
- Instead of `weight==False`, it is better to use 'not weight'. Handles
better
something like `weight=0` (faster to type `:-P`)
Looks very good!
Thanks,
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18811#comment:7>
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.