Class DirectedDepthFirstSearch
- Namespace
- AlgorithmsSW.Digraph
- Assembly
- AlgorithmsSW.dll
Provides and algorithm for finding all vertices reachable from a given vertex or set of vertices in a directed graph.
public class DirectedDepthFirstSearch
- Inheritance
-
DirectedDepthFirstSearch
- Inherited Members
- Extension Methods
Constructors
DirectedDepthFirstSearch(IDigraph, IEnumerable<int>)
Initializes a new instance of the DirectedDepthFirstSearch class.
public DirectedDepthFirstSearch(IDigraph digraph, IEnumerable<int> startVertexes)
Parameters
digraph
IDigraphThe graph to search.
startVertexes
IEnumerable<int>The vertices to start the search from.
DirectedDepthFirstSearch(IDigraph, int)
Initializes a new instance of the DirectedDepthFirstSearch class.
public DirectedDepthFirstSearch(IDigraph digraph, int startVertex)
Parameters
Properties
IsConnectedToSources
public bool IsConnectedToSources { get; }
Property Value
Methods
Reachable(int)
Checks whether a given vertex is reachable from the start vertex or vertices.
public bool Reachable(int vertex)
Parameters
vertex
intThe vertex to check.