igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] question about igraph_watts_strogatz_game


From: Gábor Csárdi
Subject: Re: [igraph] question about igraph_watts_strogatz_game
Date: Fri, 23 Mar 2012 09:46:19 -0400

On Fri, Mar 23, 2012 at 8:59 AM, Wu Degang <address@hidden> wrote:
> Hi,
>
> I created a small world graph using:
>
> igraph_watts_strogatz_game(&graph, 1, 20, 4, 0.3);
>
> but when I inspected the neighbors of node with pnode=1 by
>
> igraph_neighbors(&graph, &neis, 1, IGRAPH_ALL);
> ...
> for (int i=0;i<igraph_vector_size(&neis);++i)
>        cout << VECTOR(neis)[i] << ' ';
>
> I got the output
>
> 3 5 5 9 11 16 17 18.
>
> Why are there two 5's? I remember that duplicate edges are forbidden in the
> paper by Watts and Strogatz.

Indeed. This has been already fixed in the development version.

Gabor

>
>
> Wu Degang
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help



-- 
Gabor Csardi <address@hidden>     MTA KFKI RMKI



reply via email to

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