[Top][All Lists]

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

Re: [igraph] Random regular graph

From: Tamás Nepusz
Subject: Re: [igraph] Random regular graph
Date: Wed, 12 Sep 2012 15:51:16 +0200

Hi Raphael, 

Yes, the problem is probably that igraph does not contain a function to 
construct random _regular_ graphs. The degree sequence game is more generic as 
it can take an arbitrary degree sequence -- and as a consequence, it uses a 
completely different algorithm. In fact, a regular random graph generator has 
been in our wishlist for a while:


Now that you brought it up, I will probably start working on it in the next few 
days. If you wish, you can subscribe to the above bug so you'll be notified 
when the algorithm is added to igraph.


On Wednesday, 12 September 2012 at 15:45, Raphael Clifford wrote:

> By way of contrast, networkx takes about 4 seconds for a random
> 6-regular graph of the same size.
> In fact, using pypy networkx takes only 15 seconds to make a random
> 6-regular graph with 500000 nodes. I would expect C/C++ code to run
> at least as fast as this.
> Of course it uses a different algorithm to achieve this magic.
> http://networkx.lanl.gov/reference/generated/networkx.generators.random_graphs.random_regular_graph.html#networkx.generators.random_graphs.random_regular_graph.
> Raphael
> On 12 September 2012 14:11, Raphael Clifford <address@hidden 
> (mailto:address@hidden)> wrote:
> > I would to create large random regular graphs (in python).
> > 
> > I am currently using
> > 
> > size = 50000
> > degree = 6
> > g = Graph.Degree_Sequence([degree]*size, method='vl')
> > 
> > for example. It is rather slow (47 seconds on my admittedly slow
> > computer) even at this size and in fact I would like to make much
> > larger graphs. By way of comparison an equivalent Erdos_Renyi graph
> > takes about a second to make. Is there a better way to do this?
> > 
> > Raphael
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help

reply via email to

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