// System.out.println(this);
// STEP 3: Re-orient all edges, branching out from the root edge.
//
// Iterate over an undirected version of this graph, so we can "go
// against the grain" when we need to.
BreadthFirstIterator bfi = new BreadthFirstIterator(Graphs
.undirectedGraph(this), root);
// Toss all the nodes into a linked list.
LinkedList linked = new LinkedList();
while (bfi.hasNext())
{
linked.addLast(bfi.next());
}
// Now, go through the list of nodes, re-orienting edges as needed.
// Set the root node as the first parent in our algorithm.
HashMap seen = new HashMap();
Integer stupidInt = new Integer(1);