public bool reconstruct_vertices(Intarray result_vertices) { Intarray vertices = new Intarray(); if (accepted_from == -1) { return(false); } vertices.Push(accepted_from); int last = accepted_from; int next; while ((next = came_from[last]) != last) { vertices.Push(next); last = next; } NarrayUtil.Reverse(result_vertices, vertices); return(true); }