Thanks. The nice thing about networkx is that you also get the source http://networkx.lanl.gov/_modules/networkx/generators/random_graphs.html#random_regular_graph (which in this case is particularly short and simple).
Best wishes, Raphael On 12 September 2012 14:51, Tamás Nepusz <[email protected]> wrote: > 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: > > https://bugs.launchpad.net/igraph/+bug/380911 > > 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. > > Best,-- > T. > > > 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 <[email protected] >> (mailto:[email protected])> 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 >> [email protected] (mailto:[email protected]) >> https://lists.nongnu.org/mailman/listinfo/igraph-help > > > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
