| igraph Reference Manual |
|---|
int igraph_permute_vertices(const igraph_t *graph, igraph_t *res, const igraph_vector_t *permutation);
This function creates a new graph from the input graph by permuting
its vertices according to the specified mapping. Call this function
with the output of igraph_canonical_permutation() to create
the canonical form of a graph.
Arguments:
graph: |
The input graph. |
res: |
Pointer to an uninitialized graph object. The new graph is created here. |
permutation: |
The permutation to apply. Vertex 0 is mapped to the first element of the vector, vertex 1 to the second, etc. Note that it is not checked that the vector contains every element only once, and no range checking is performed either. |
Returns:
|
Error code. |
Time complexity: O(|V|+|E|), linear in terms of the number of vertices and edges.
| << 1. The simple interface | 1.2. igraph_isomorphic — Decides whether two graphs are isomorphic >> |