Package ghidra.graph.algo
Class DepthFirstSorter<V,E extends GEdge<V>>
java.lang.Object
ghidra.graph.algo.DepthFirstSorter<V,E>
- Type Parameters:
V
- the vertex typeE
- the edge type
Processes the given graph depth first and records that order of the vertices.
-
Method Summary
Modifier and TypeMethodDescriptionpostOrder
(GDirectedGraph<V, E> g) Returns the vertices of the given graph in post-order, which is the order the vertices are last visited when performing a depth-first traversal.postOrder
(GDirectedGraph<V, E> g, GraphNavigator<V, E> navigator) Returns the vertices of the given graph in post-order, which is the order the vertices are last visited when performing a depth-first traversal.preOrder
(GDirectedGraph<V, E> g) Returns the vertices of the given graph in pre-order, which is the order the vertices are encountered when performing a depth-first traversal.preOrder
(GDirectedGraph<V, E> g, GraphNavigator<V, E> navigator) Returns the vertices of the given graph in pre-order, which is the order the vertices are encountered when performing a depth-first traversal.
-
Method Details
-
postOrder
Returns the vertices of the given graph in post-order, which is the order the vertices are last visited when performing a depth-first traversal.- Parameters:
g
- the graph- Returns:
- the vertices in post-order
-
preOrder
Returns the vertices of the given graph in pre-order, which is the order the vertices are encountered when performing a depth-first traversal.- Parameters:
g
- the graph- Returns:
- the vertices in pre-order
-