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 type
  `E` - the edge type

public class DepthFirstSorter<V,E extends GEdge<V>> extends Object
Processes the given graph depth first and records that order of the vertices.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <V, E extends GEdge<V>>
  List<V>`
  `postOrder(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.
  `static <V, E extends GEdge<V>>
  List<V>`
  `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.
  `static <V, E extends GEdge<V>>
  List<V>`
  `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.
  `static <V, E extends GEdge<V>>
  List<V>`
  `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.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### postOrder

    public static <V, E extends GEdge<V>> List<V> postOrder(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.
    Parameters:
      `g` - the graph
    Returns:
      the vertices in post-order

  - ### postOrder

    public static <V, E extends GEdge<V>> List<V> 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.
    Parameters:
      `g` - the graph
      `navigator` - the knower of the direction the graph should be traversed
    Returns:
      the vertices in post-order

  - ### preOrder

    public static <V, E extends GEdge<V>> List<V> 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.
    Parameters:
      `g` - the graph
    Returns:
      the vertices in pre-order

  - ### preOrder

    public static <V, E extends GEdge<V>> List<V> 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.
    Parameters:
      `g` - the graph
      `navigator` - the knower of the direction the graph should be traversed
    Returns:
      the vertices in pre-order