[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] iGraphObjects
From: |
Gábor Csárdi |
Subject: |
Re: [igraph] iGraphObjects |
Date: |
Sat, 6 Mar 2010 00:47:40 +0100 |
Hi Harun,
On Fri, Mar 5, 2010 at 4:22 PM, Harun Pirim <address@hidden> wrote:
[...]
> 1-) cGrph <- lapply(1:3, delete.edges(MST,
> c(which.max(edge.betweenness(MST))-1))) I use that script to iteratively
> remove the most between 3 edges in MST(a tree) but this doesn’t work.
>
> So how can end up with a forest removing the most between 3 edges using a
> loop structure?
A loop structure is not easy, because the edge ids are reassigned
after each edge deletion. You would need to use edge attributes to
keep track of the edges. Another solution is to remove all edges at
the same time.
But actually, why do you think that removing the edges with the top
edge betweenness values gives you an MST? I think this is not true in
general.
>
> 2-) I have many subgraphs, I want to calculate the degree of vertices in
> each subgraph and hold them in a list to be able to compare with the values
> in another list.
Put the subgraphs in a list:
mylist <- list(g1, g2, g3)
degs <- sapply(mylist, degree)
Best,
Gabor
> I tried this code:
>
>
>
> y <- lapply(0:4, function(i) paste(sgr, i, sep="") )
>
>
>
> here sgr1 for example is a graph object, I was hoping exactly to get sgr1
> object values when I write y[[2]], however this list gives confusing
> elements which is really different than sgr0, sgr1, sgr2, sgr3, sgr4.
>
>
>
> Sgr1 is :
>
>
>
> Vertices: 3
>
> Edges: 3
>
> Directed: FALSE
>
> Edges:
>
>
>
> [0] 'ERn_LNp_Nevins7' -- 'ERn_LNn_Nevins26'
>
> [1] 'ERn_LNp_Nevins7' -- 'ERn_LNn_Nevins48'
>
> [2] 'ERn_LNn_Nevins26' -- 'ERn_LNn_Nevins48'
>
>
>
>
>
>
>
> Best Regards,
>
>
>
>
>
> Harun Pirim
>
> MS State Univ.
>
> Ind. & Sys. Eng. Dept.
>
> address@hidden
>
> www2.msstate.edu/~hp100
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
--
Gabor Csardi <address@hidden> UNIL DGM