// If no more arcs go out of a given state in the layer, then we remove the state from that layer
while (layerIter.hasNext())
if (!mark.get(layerIter.next()))
layerIter.remove();
}
return new StoredDirectedMultiGraph(environment, graph, starts, offsets, totalSizes);
}