You could use igraph_clusters() instead. It computes the mapping without creating new graphs.
If you need to create a new graph from a component, igraph_induced_subgraph should work. On 13 February 2016 at 20:07, Hadidi, Lars <lhad...@students.uni-mainz.de> wrote: > 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. > > > > > _______________________________________________ > igraph-help mailing list > igraph-help@nongnu.org > https://lists.nongnu.org/mailman/listinfo/igraph-help > _______________________________________________ igraph-help mailing list igraph-help@nongnu.org https://lists.nongnu.org/mailman/listinfo/igraph-help