My understanding of the parameter k of the Watts-Strogatz model is that every node starts by having exactly k neighbors (k/2 on each "side" of a ring structure), resulting in a graph with Nk/2 edges in total. This agrees with the definition published on wikipedia, for instance.
Since the algorithm works by rerouting edges (with porbability p), the number of edges remains unchanged and the resulting graph should have Nk/2 edges. However, when running the import plugin with k = 3 and k = 4 I respectively get graphs having 1200 and 1500 edges just as if the values for k were 8 and 10 respectively.
What am I getting wrong here?
Thanks
Thanks for your report.
The algorithm works as you described when the “original” parameter is set to “true”.
Unfortunately, in this configuration, the check of the parameters is wrong
N < ln(k) (instead of k >= ln(N))
which causes an error to be returned, preventing the algorithm from being correctly executed.
This will be fixed for the next Tulip release.
I see, thanks for looking into this. I overlooked the parameter "original model" so I expected the original model to be executed ... May I suggest to set the default value of the "original model" parameter to true?
Seems to be a good idea.