igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Recover original vertex ID from graph decomposition


From: Hadidi, Lars
Subject: Re: [igraph] Recover original vertex ID from graph decomposition
Date: Sat, 13 Feb 2016 21:36:27 +0000

Thanks for an quick answer.

I think that is an good idea but I need to create the component graph manually 
by adding the vertices and edges and keeping track of all vertex IDs.

This is caused by constraints of the problem to be solved:

The input is a bipartite graph. A matching of minimum weight needs to be 
calculated. As the input graph is a sparse graph, the matching computation can 
be parallelized by decomposing the graph into its components and calculate the 
matching on every component in concurrently.

Therefore, I need to recover the original IDs from the matching result.

Is there a mapping between induced graph vertex IDs and the original ones ? 
This would simplify everything.


________________________________________
Von: address@hidden <address@hidden> im Auftrag von Szabolcs Horvát 
<address@hidden>
Gesendet: Samstag, 13. Februar 2016 20:40
An: Help for igraph users
Betreff: Re: [igraph] Recover original vertex ID from graph decomposition

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
<address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>

_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help



reply via email to

[Prev in Thread] Current Thread [Next in Thread]