|
From: | address@hidden |
Subject: | Re: [igraph] Question about the functions induced.subgraph() and clusters() |
Date: | Fri, 21 Mar 2014 22:57:17 +0800 |
Thank you
If I want to generate a subgraph which contains all the vertices and just
delete the edges to make the vertices (which were meant to be delete) to be
isolate,
then which command could I use?
Or is there any command can be used to generate a subgraph without
changing the vertice ids?
best
Xueming address@hidden From: Gábor
Csárdi
Date: 2014-03-21 22:17
Subject: Re: [igraph] Question about the functions
induced.subgraph() and clusters() Internal vertex ids change if you change the graph. E.g.
set.seed(42)
ga <- erdos.renyi.game(1000,
1500, type = "gnm", directed=TRUE)
ga
wcca <-
clusters(ga, mode="weak")
for (i in
1:10) {
largest_wcc_va <- which(wcca$membership == which.max(wcca$csize))
ga
<- induced.subgraph(ga, largest_wcc_va)
}
ga
Gabor
On Fri, Mar 21, 2014 at 10:00 AM, address@hidden <address@hidden> wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |