In my graphs, I generally have at least two completely disconnected subgraphs or components. These components may be of 1 or N vertices. I can easily detect orphans, but not components.
Orphans are easy:
myGraph.Vertices.Where(v => myGraph.InDegree(v) == 0)
I have no idea how to get the disconnected components.
Orphans are easy:
myGraph.Vertices.Where(v => myGraph.InDegree(v) == 0)
I have no idea how to get the disconnected components.