Click or drag to resize

DepthFirstSearch Properties

The DepthFirstSearch type exposes the following members.

Properties
  NameDescription
Public propertyAllowCyclicGraph
Flag specifying whether cyclic graphs are allowed. Default is true. If set to false, and the graph is cyclic, an exception will be thrown during the search.
Public propertyDiscovered
An integer describing the step in the depth first search tree where each vertex was discovered.
Public propertyFinished
An integer describing the step in the depth first search tree where each vertex was finished.
Public propertyNumberOfCrossTreeConnections
Returns the number of cross-tree connections, i.e. connections between different predecessor trees.

The number of cross tree connections equals the number of "cross edges" in the graph.

Public propertyNumberOfCycles
Returns the number of cycles identified in the graph.

The number of cycles equals the number of "back edges" in the graph.

Public propertyNumberOfIndependentSubgraphs
Returns the number of independent subgraphs in the graph, i.e. graphs that does not connect to each other in any way
Public propertyNumberOfPredecessorTrees
Returns the number predecessor trees in the predecessor forest, i.e. the number of -1's found in the Predecessors
Public propertyNumberOfSplitJoins
Returns the number of split-join cycles identified in the graph.

The number of split-join cycles equals the number of "forward edges" in the graph.

Public propertyPredecessors
Main output of the depth first search is the predecessor tree forest.

Each root vertex in a predecessor tree returns -1. The remaining vertices return the index of its predecessor in the tree, i.e.

Predecessors[4] = 2
means that the index-4 vertex has the index-2 vertex as its predecessor.

Top
See Also