Noob question. How do I add a vertex to a graph and get its value, as in the following code fragment?
add_vertex!(g) v = maximum(vertices(g)) # better way to do this? add_edge!(g, cur, v) cur = v
That works for simple cases where no vertices have been removed, but probably isn’t very efficient. Is there a canonical way to do it?