igraph-help
[Top][All Lists]
Advanced

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

[igraph] question about igraph_watts_strogatz_game


From: Wu Degang
Subject: [igraph] question about igraph_watts_strogatz_game
Date: Fri, 23 Mar 2012 20:59:56 +0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

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.



Wu Degang



reply via email to

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