/** Does a conversion of the fork container class to a set of block starts */ ArrayDeque<ParallelBlockStart> convertForksToBlockStarts(ArrayDeque<Fork> parallelForks) { // Walk through and convert forks to parallel block starts, and find heads that point to them ArrayDeque<ParallelBlockStart> output = new ArrayDeque<ParallelBlockStart>(); for (Fork f : parallelForks) { // Do processing to assign heads to flowsegments ParallelBlockStart start = new ParallelBlockStart(); start.forkStart = f.forkStart; start.unvisited = new ArrayDeque<FlowNode>(); // Add the nodes to the parallel starts here for (FlowPiece fp : f.following) { if (fp.isLeaf()) { // Forks are never leaves start.unvisited.add(((FlowSegment)fp).visited.get(0)); } } output.add(start); } return output; }