Click or drag to resize

TraversalDepthFirstSearch Method

Returns node with node with distance from nodeSource and predecesor based on Breadth first search.

Namespace:  GraphLibrary
Assembly:  GraphLibrary (in GraphLibrary.dll) Version: 1.0.1
Syntax
C#
public IEnumerable<Tuple<int, int, Nullable<int>>> DepthFirstSearch(
	BaseGraph graph,
	int nodeSource = 0,
	Nullable<int> nodeEnd = null,
	int maxDepth = 2147483647
)

Parameters

graph
Type: GraphLibrary.GraphsBaseGraph
BaseGraph graph.
nodeSource (Optional)
Type: SystemInt32
Node from where the BFS algorithm starts.
nodeEnd (Optional)
Type: SystemNullableInt32
maxDepth (Optional)
Type: SystemInt32

Return Value

Type: IEnumerableTupleInt32, Int32, NullableInt32
Yields Tuple of nodes, distance and it's predecesor.
See Also