sbromberger / LightGraphs.jl

An optimized graphs package for the Julia programming language
Other
672 stars 185 forks source link

New rich club metric #1549

Open vboussange opened 3 years ago

vboussange commented 3 years ago

Hi there, I suggest to add the rich-club metric (cf Wikipedia ) to beautiful LightGraphs.jl, under the community metrics.

rich_club(g,k)

Return the non-normalised rich-club coefficient of graph g, with degree cut-off k.

julia> using LightGraphs
julia> g = star_graph(5)
julia> rich_club(g,1)
0.4
codecov[bot] commented 3 years ago

Codecov Report

Merging #1549 (0b9ba32) into master (e7669f2) will increase coverage by 0.06%. The diff coverage is 100.00%.

:exclamation: Current head 0b9ba32 differs from pull request most recent head 34ad732. Consider uploading reports for the commit 34ad732 to get more accurate results

@@            Coverage Diff             @@
##           master    #1549      +/-   ##
==========================================
+ Coverage   99.37%   99.44%   +0.06%     
==========================================
  Files         108      107       -1     
  Lines        5157     5560     +403     
==========================================
+ Hits         5125     5529     +404     
+ Misses         32       31       -1