igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] calculating the number of edges on the boundary of S


From: Tamas Nepusz
Subject: Re: [igraph] calculating the number of edges on the boundary of S
Date: Fri, 28 Nov 2014 20:21:17 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

> after the steps you explain to me ,I use the graph.strength()  to get the
> number of edges pointed out for each community, But I was wondering is it
> any way to assign  the id of each vertex  in the contracted graph exactly
> the membership number of the community in the original graph.
This is exactly what happens if you use contract.vertices() with the membership
vector. contract.vertices() expects a vector that tells the "new" ID of each
vertex after the contraction. So, if the value belonging to a certain vertex in
the membership vector is X, then the vertex will be merged into the "new" node
with ID=X in the contracted graph.

Best,
T.



reply via email to

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