-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: mean_interbuilding_distance and building_adjacency #556
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #556 +/- ##
=======================================
+ Coverage 97.4% 97.6% +0.3%
=======================================
Files 26 30 +4
Lines 4328 4796 +468
=======================================
+ Hits 4214 4682 +468
Misses 114 114
|
I think it makes sense, cleaner and more efficient for sure. |
Solved in 0d897cc by cheaply (10ms) checking if the graph already has self-weights and assigning only if they do not. Which means that if you pass self-weighted graph, the new implementation takes about half the time compared to the original. |
Gosh I spent way too much time on this...
mean_interbuilding_distance:
Given my first attempt took 5mins, I call this a victory.
building_adjacency:
of which 330 ms is
assign_self_weight
which will be used in other functions so I'm wondering if it is worth adding a keywordself_weighted=True
to skip this. In practice it is nearly negligible difference though...These two functions also quite significantly change the API compared to the original. @jGaboardi can you give it a thought whether it makes sense in this way? I think it does and it is more flexible than before but it is different.