Ticket #3579: trac3579-random_graph_generator_bug_fix.patch
| File trac3579-random_graph_generator_bug_fix.patch, 1.1 kB (added by ekirkman, 5 months ago) |
|---|
-
a/sage/graphs/graph_generators.py
old new 2185 2185 ... 2186 2186 sage: G = sage.plot.plot.GraphicsArray(j) 2187 2187 sage: G.show() 2188 sage: graphs.RandomGNP(4,1) 2189 Complete graph: Graph on 4 vertices 2188 2190 2189 2191 TIMINGS: 2190 2192 The following timings compare the speed with fast==False and … … 2209 2211 """ 2210 2212 if seed is None: 2211 2213 seed = current_randstate().long_seed() 2214 if p == 1: 2215 return graphs.CompleteGraph(n) 2212 2216 import networkx 2213 2217 if fast: 2214 2218 G = networkx.fast_gnp_random_graph(n, p, seed)