public class GraphUtils<T>
Functions used for Graph traversal and analysis
public static <T> Tuple<java.util.ArrayList,java.util.ArrayList> dfsLabeledEdges(Graph<T> G, T source)
Produces edges in a depth-first search starting at source and labeled -1,0,1 for forward, reverse, and nontree (direction type). Based on http://www.ics.uci.edu/~eppstein/PADS/DFS.py by D. Eppstein, July, 2004
G - A graphsource - The source node of the graphpublic static <T> java.util.ArrayList<T> dfsPreorderNodes(Graph<T> G, T source)
Produces nodes in a depth-first search pre-ordering starting at source (i.e. listing node starting with the source node)
G - A graphsource - The source node of the graphpublic static <T> java.util.ArrayList<T> dfsPostorderNodes(Graph<T> G, T source)
Produces nodes in a depth-first search post-ordering starting at source (i.e. listing node starting with the last node and headed toward source)
G - A graphsource - The source node of the graph