Returns a subgraph of graph Graph. The resulting subgraph contains all the edges from Graph with edge IDs in EIdV and all the nodes that are connected by at least one edge in EIdV. Nodes and edges in the resulting subgraph have the same IDs as in Graph.
Parameters:
A Snap.py network.
A vector of edge IDs in graph.
Return value:
A Snap.py network, which is a subgraph of Graph with EIdV edges.
The following example shows how to use GetESubGraph() with TNEANet:
import snap
Network = snap.GenRndGnm(snap.PNEANet, 100, 1000)
EIdV = snap.TIntV()
for EI in Network.Edges():
EIdV.Add(EI.GetId())
ESubGraph = snap.GetESubGraph(Network, EIdV)