Repository navigation
Adds an edge-induced subgraph method - #1740
Conversation
|
This new function can be used in pull request #1538, and can be used in the function |
3e49528 to
b0c6ca8
Compare
|
This can also be used in #1703, so that a copy of the graph will not be required. |
b0c6ca8 to
4ebd3ce
Compare
This adds the ability to get an edge-induced subgraph for graphs, digraphs, multigraphs, and multidigraphs.
4ebd3ce to
99198f6
Compare
|
I think this is an extremely useful function for implementing other algorithms, I'd like to push for its inclusion! |
|
I am looking at this and thinking about the best implementation in terms of Something like: And it should be lightweight (low ram) and fast. :} On Thu, Feb 4, 2016 at 1:31 AM, jfinkels [email protected] wrote:
|
|
I was hoping to find a nice light-weight "view approach" to edge-subgraph. But this is a good implementation of creating a new shallow graph copy with only those edges. I'm going to merge and if/when we come up with a "view" version we can morph this at that time. Thanks @jfinkels |
branch 'edge-subgraph' from @jfinkels
|
How is this different from G = nx.Graph(subedges)? |
|
Node information is preserved (if the node is the head or tail of one of the edges). |
|
The edge data is "shallow copied" in that the subgraph uses the same datadict as the graph. |
Fixes issue #330.