rustworkx.isolates#
- isolates(graph)[source]#
Return a list of isolates in a graph object
An isolate is a node without any neighbors meaning it has a degree of 0. For directed graphs this means the in-degree and out-degree are both 0.
- Parameters:
graph – The input graph to find isolates in
- Returns:
A list of node indices for isolates in the graph
- Return type: