Hi Tamàs, Thanks for your reply. I am sorry for responding so late but I just continued with the unweighted graph for the time being. But I will definitely try the solution you have given and let you know if it works or not. thanks again.
Regards, Manisha On Feb 15, 9:31 pm, Tamás Nepusz <[email protected]> wrote: > Oh, I forgot to mention: the workaround for the time being is to calculate > the betweenness score for all the vertices and then extract the value > corresponding to "a" from the result vector: > > scores = g.betweenness(weights="weight") > print scores[g.vs.find("a").index] > > This won't take longer than calculating the betweenness for "a" only because > the betweenness calculation needs to find all the shortest paths in the graph > even if you want the betwenness of a single node only. > > -- > T. > > On 8 Feb 2013, at 16:29, Manisha <[email protected]> wrote: > > > > > > > > > > > Hello friends, > > > This is the first time I am using Igraph and I am trying to get some > > information on a weighted graph using the functions available. I want > > to get the betweenness centrality for a node in the graph by passing > > node names as parameter. Here is my graph > > >>>> g=ig.Graph() > >>>> g.add_vertices(['a','b','c','d']) > >>>> g.add_edge('a','b',weight=0.2) > >>>> g.add_edge('b','c',weight=0.2) > >>>> g.add_edge('c','d',weight=0.5) > >>>> g.add_edge('b','d',weight=0.1) > > > It works well if I test on unweighted graph i.e. > >>>> g.betweenness('a') > > > But when I try to execute the same function selecting the weight > > attribute on edge > > >>>> g.betweenness('a', weights='weight') > > > It gives some kind of error and blocks my python interpreter. Below is > > the message it is showing > > > *** glibc detected *** python: corrupted double-linked list: > > 0x000000001a6c8b10 *** > > > Can anybody understand this and please help me understand what's wrong > > and correct it? > > I will be really thankful for any help. > > > Regards, > > Manisha > > > _______________________________________________ > > igraph-help mailing list > > [email protected] > >https://lists.nongnu.org/mailman/listinfo/igraph-help > > _______________________________________________ > igraph-help mailing list > [email protected]https://lists.nongnu.org/mailman/listinfo/igraph-help _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
