Is there a function that re-orders vertices while preserving vertex and edge attributes? I am primarily interested in the Python interface, but if there is a function, I’d also like to know its name in C and R.
I could not find one, but this seems like a fairly fundamental operation, so perhaps I missed it.
Example to clarify:
Given a directed graph with vertices
0, 1, 2 and one edge
1 -> 2, permute/rename the vertices as
0 -> 2 1 -> 1 2 -> 0
to obtain the graph with the edge
1 -> 0.