igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Multigraph, Source codes


From: Gábor Csárdi
Subject: Re: [igraph] Multigraph, Source codes
Date: Wed, 11 Feb 2009 10:25:06 +0100

Hi Aisan,

On Wed, Feb 11, 2009 at 4:28 AM, Aisan Kazerani
<address@hidden> wrote:
> Hi Gabor,
>
> Sorry to ask many questions in different directions, but I just wanna see
> if I can solve my problem with different tricks!
>
> -Does igraph accept multigraph in form of a matrix?

Yes, if you use R, graph.adjacency() handles this:

> a <- matrix( c(0,2,3,0), nc=2)
> graph.adjacency(a)
Vertices: 2
Edges: 5
Directed: TRUE
Edges:

[0] 0 -> 1
[1] 0 -> 1
[2] 0 -> 1
[3] 1 -> 0
[4] 1 -> 0

> -Can I have the source code for weighted betweenness and also edge
> betweenness centralities, so that I can use them for writing the weighted
> edge betweenness code?

Yes, download the source code from
http://cneurocvs.rmki.kfki.hu/igraph/download.html
Betwenness related functions are in src/centrality.c if I remember well.

Hmmm, but for the weighted betweenness, that is in the development
version, this is the source code of a not-too-old snapshot of the R
package:
http://cneurocvs.rmki.kfki.hu/igraph/download/igraph_0.6.tar.gz

> I think they should be quit the same in many ways.

Well, somewhat similar, but not completely. For the weighted case you
need to use Dijkstra's algorithm to find the shortest paths, for the
unweighted case a breadth-first search is better.

> If I would be able to write the code, I will definately share it with you.

Actually you kind of must do this, at least if you share it with
anyone, you have to give them the source code as well, according to
igraph's license.

Best,
Gabor

> Cheers,
> Aisan
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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