Repository navigation
Conversation
core_number peels the graph a round at a time: every node of degree at most k leaves together, one masked product takes their edges off their neighbors' degrees, and when a round finds no such node, k rises to the smallest degree left. A node's core number is the k at which it leaves. A directed graph's degree is its in-degree plus its out-degree, so a pair with an edge each way counts twice, as in NetworkX. onion_layers numbers the same rounds. k_core, k_shell, k_crust and k_corona are subgraphs induced by the core numbers, keeping the input's values and graph attributes; as for k_truss, a graph with data a matrix cannot hold is left to NetworkX, and so is a precomputed core_number. Self-loops raise NetworkX's errors, and the results list their nodes in NetworkX's order.
k_core, k_corona, k_crust and k_shell rebuild their result from one matrix as compose and k_truss do, so their additional_docs now carry the same note on the type the edge weights come back in, in place of the shorter one they had.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 18-tree-recognition #120 +/- ##
=======================================================
+ Coverage 92.55% 92.69% +0.14%
=======================================================
Files 177 178 +1
Lines 10673 10938 +265
Branches 1232 1253 +21
=======================================================
+ Hits 9878 10139 +261
Misses 546 546
- Partials 249 253 +4 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add core decomposition by peeling the graph a round at a time.
core_number,onion_layersk_core,k_shell,k_crust,k_corona(graphs with data a matrix cannot hold, a precomputedcore_number, and akthat is not a real number are left to NetworkX)NetworkXNotImplemented, as in NetworkXk_names carry the note on a rebuilt graph's weights taking one type, as the other graph-returning names doStacked on #119.