Shields.Graphs/Graph.cs
/// <summary>
/// Gets the connected components of a graph. For digraphs use <see cref="StronglyConnectedComponents"/>.
/// </summary>
/// <typeparam name="TNode">The type of a node.</typeparam>
/// <typeparam name="TKey">The type of a node key.</typeparam>
/// <param name="nodes">The set of nodes.</param>
/// <param name="descriptor">The object describing how to navigate the graph.</param>
/// <returns>The connected components of the graph.</returns>
Gets the connected components of a graph. For digraphs use .
Gets the connected components of a graph . For digraphs use .
public static IEnumerable<IEnumerable<TNode>> ConnectedComponents<TNode, TKey>(
            this IEnumerable<TNode> nodes,
            IGraphDescriptor<TNode, TKey> descriptor)
        {
            return ConnectedComponents(nodes, descriptor.Key, descriptor.Next);
        }
public static IEnumerable < IEnumerable < TNode > > ConnectedComponents < TNode , TKey > ( this IEnumerable < TNode > nodes , IGraphDescriptor < TNode , TKey > descriptor ) { return ConnectedComponents ( nodes , descriptor . Key , descriptor . Next ) ; }
Gets the connected components of a graph.
Gets the connected components of a graph .
The connected components of the graph.
The connected components of the graph .
IEnumerable<TNode>
this
descriptor
IGraphDescriptor<TNode, TKey>
The object describing how to navigate the graph.
The object describing how to navigate the graph .
nodes
The set of nodes.
The set of nodes .
typeparam
The type of a node.
The type of a node .
typeparam
The type of a node key.
The type of a node key .