There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Finding Disconnected Subgraphs or Components
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. Ideally, I'd like to return an IEnumerable<BidirectionalGraph<T>> from myGraph which is BidirectionalGraph<T>.