[graph-tool] Random graph generation in graph-tool

Snehal Shekatkar snehalshekatkar at gmail.com
Mon Feb 13 18:05:48 CET 2017

Hello Tiago,

Thanks for the reply. I have included all the commands in the previous
email. My degree_sampler is a function:

def deg_samp(k0 = 3):
     return np.random.poisson(k0)

Then I use it in two different (and in my opinion, equivalent) ways:

G = gt.random_graph(500, lambda : deg_samp(3), directed = False)
G = gt.random_graph(500, deg_samp, directed = False)

I expect both these graphs to be similar. However, I find that the second
one is extremely dense and its average degree far exceeds 3. I am quite
confused about this.

Thank you

On Mon, Feb 13, 2017 at 10:11 PM, Tiago de Paula Peixoto <tiago at skewed.de>

> On 13.02.2017 16:07, Snehal Shekatkar wrote:
> > What am I missing exactly?
> Impossible to say, without a minimal, complete and self-contained example.
> --
> Tiago de Paula Peixoto <tiago at skewed.de>
> _______________________________________________
> graph-tool mailing list
> graph-tool at skewed.de
> https://lists.skewed.de/mailman/listinfo/graph-tool


Snehal Madhukar Shekatkar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.skewed.de/pipermail/graph-tool/attachments/20170213/bfb9f902/attachment.htm>

More information about the graph-tool mailing list