I have generated a network via random draws. Now when I plot the network via LightGraphs.jl I also get the unconnected nodes:
However, I wish to exclude those nodes from the graph. Is this possible?
I have generated a network via random draws. Now when I plot the network via LightGraphs.jl I also get the unconnected nodes:
However, I wish to exclude those nodes from the graph. Is this possible?
Copyright © 2021 Jogjafile Inc.
Yes, use the
getindexorinduced_subgraphfunctions (I assume you want to exclude0-degree nodes):The benefit of
induced_sugraphis that it also returns a vector mapping the new vertices to the old ones.