igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Generating scale-free networks with different exponents


From: Tamas Nepusz
Subject: Re: [igraph] Generating scale-free networks with different exponents
Date: Tue, 08 Nov 2011 17:12:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

>> degs <- sample(1:n, n, replace=TRUE, prob=(1:n)^(-scale))
> Depending on your exponent, it is possible that the generated degree
> sequence cannot be realized as a graph.
Also note that you are sampling from 1:n, which means that n may be included
in the sample. However, in a graph with n vertices, the maximum degree may
only be n-1 if you are aiming for a simpe graph (which the VL generator
does). So, once "n" gets into the sample, the entire process will fail.

Best,
Tamas



reply via email to

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