This class can iterate in both directions on a threaded tree.
108109110111112113114115116117118119120121122
if (v.lowlink == v.index) { IntVertexInfo j; // ArrayList<N> component = new ArrayList<N>(); IntSortedSet component = new IntAVLTreeSet(); do { j = this.S.pop(); component.add(j.node); } while (j != v); internalComponents.add(component); }