fslaborg / Graphoscope

A pragmatic approach to network science.
http://fslab.org/Graphoscope/
MIT License
14 stars 6 forks source link

Degree measures for digraph #33

Closed DoganCK closed 1 year ago

DoganCK commented 1 year ago

Added degree measures and tests for digraph

Notes:

codecov[bot] commented 1 year ago

Codecov Report

Merging #33 (3069963) into developer (f9c8554) will increase coverage by 2.49%. The diff coverage is 59.52%.

@@              Coverage Diff              @@
##           developer      #33      +/-   ##
=============================================
+ Coverage      25.31%   27.80%   +2.49%     
=============================================
  Files             28       28              
  Lines           1197     1212      +15     
=============================================
+ Hits             303      337      +34     
+ Misses           894      875      -19     
Files Changed Coverage Δ
src/Graphoscope/Measures/Loop.fs 44.44% <0.00%> (-22.23%) :arrow_down:
src/Graphoscope/Measures/OutDegree.fs 60.00% <53.84%> (+8.14%) :arrow_up:
src/Graphoscope/Measures/Degree.fs 55.55% <66.66%> (+22.99%) :arrow_up:
src/Graphoscope/Measures/InDegree.fs 74.28% <92.30%> (+22.43%) :arrow_up:

... and 1 file with indirect coverage changes

LibraChris commented 1 year ago

Hey Thank you for implementing the degree and loop measures for DiGraph. In regards to your notes:

The only thing we need to agree upon is to remove type conversions and, when possible, work with casts. This results in more performant code and the type conversion can be used on top of that if needed. This would mean working with Sequences operations instead of Array operations. This also results in the same type of return types between FGraph and DiGraph operations.

DoganCK commented 1 year ago

@LibraChris There are some places where it’s super sensible to use Enumerables but I’m not sure this holds all the time. Honestly, I need to dig deeper as to how they work under the hood as well. Let’s postpone discussing those to a later time.

Also the ordering of degree sequences from the atlas book seems effectively the same to me. non-increasing is a slightly more rigorous way of putting it than decreasing because there may be nodes with equal degrees.

LibraChris commented 1 year ago

Ok Let´s handle this at a later time