|
From: | Hadidi, Lars |
Subject: | [igraph] Recover original vertex ID from graph decomposition |
Date: | Sat, 13 Feb 2016 19:07:21 +0000 |
The igraph_decompose function decomposes a given graph into its connected components. The vertex ids in the new graphs will be different than in the original graph.
Is it possible to get the original IDs of the vertices for each component ?
The elements of the components' result vector point to each component. There may be a mapping between the components IDs and the input graph, e.g. original id is the component id plus the sum of the amount of vertices of all previous components from the result vector.
|
[Prev in Thread] | Current Thread | [Next in Thread] |