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  
    21852185            ... 
    21862186            sage: G = sage.plot.plot.GraphicsArray(j) 
    21872187            sage: G.show() 
     2188            sage: graphs.RandomGNP(4,1) 
     2189            Complete graph: Graph on 4 vertices 
    21882190 
    21892191        TIMINGS: 
    21902192        The following timings compare the speed with fast==False and 
     
    22092211        """ 
    22102212        if seed is None: 
    22112213            seed = current_randstate().long_seed() 
     2214        if p == 1: 
     2215            return graphs.CompleteGraph(n) 
    22122216        import networkx 
    22132217        if fast: 
    22142218            G = networkx.fast_gnp_random_graph(n, p, seed)