[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: [igraph] Random regular graph

**From**: |
Raphael Clifford |

**Subject**: |
Re: [igraph] Random regular graph |

**Date**: |
Wed, 12 Sep 2012 14:45:41 +0100 |

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> 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*