-
Notifications
You must be signed in to change notification settings - Fork 8
Create induced subgraph from edge list #37
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
Create induced subgraph from edge list #37
Conversation
|
Thanks for the contribution! |
Codecov Report
@@ Coverage Diff @@
## master #37 +/- ##
==========================================
+ Coverage 94.80% 95.06% +0.25%
==========================================
Files 9 9
Lines 443 466 +23
==========================================
+ Hits 420 443 +23
Misses 23 23
|
src/overrides.jl
Outdated
| newg.weights = new_weights | ||
| for e in edges(newg) | ||
| if e ∉ elist | ||
| newg.weights[dst(e), src(e)] = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not gonna work because the matrix new_weights has new indexing due to the removal of many vertices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. I have reimplemented the function and added new tests!
|
@pgrepds can you merge the recent changes from the |
…ghts-for-edge-lists
Sorry for the late response. Yes, done! |
In order to fix #32, I have added an implementation of the
induced_subgraphfunction that creates an edge induced subgraph from a list of edges.