Skip to content

CP-25751: Finding Disconnected Subgraphs or Components #150

Description

@fubar-coder

From unknown CodePlex user on Monday, 29 September 2014 06:04:04

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> from myGraph which is BidirectionalGraph.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions