{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/27","labels_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/27/comments","events_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/27/events","html_url":"https://github.com/JuliaGraphs/LightGraphs.jl/issues/27","id":63089046,"number":27,"title":"erdos_renyi is n^2 algorithm","user":{"login":"jpfairbanks","id":2753998,"avatar_url":"https://avatars.githubusercontent.com/u/2753998?v=3","gravatar_id":"","url":"https://api.github.com/users/jpfairbanks","html_url":"https://github.com/jpfairbanks","followers_url":"https://api.github.com/users/jpfairbanks/followers","following_url":"https://api.github.com/users/jpfairbanks/following{/other_user}","gists_url":"https://api.github.com/users/jpfairbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/jpfairbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpfairbanks/subscriptions","organizations_url":"https://api.github.com/users/jpfairbanks/orgs","repos_url":"https://api.github.com/users/jpfairbanks/repos","events_url":"https://api.github.com/users/jpfairbanks/events{/privacy}","received_events_url":"https://api.github.com/users/jpfairbanks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-19T20:54:26Z","updated_at":"2015-03-26T18:41:05Z","closed_at":null,"body":"You can instead compute the number of edges to draw as `ne ~ binomial((n^2-n)/2 , p)` and then pick `i,j` uniformly at random until you hit `ne` edges. This leads to an O(ne) algorithm for small `p` For large `p` you end up doing O(n^2) work anyway."},"comment":{"url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/comments/86663075","html_url":"https://github.com/JuliaGraphs/LightGraphs.jl/issues/27#issuecomment-86663075","issue_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/27","id":86663075,"user":{"login":"sbromberger","id":941359,"avatar_url":"https://avatars.githubusercontent.com/u/941359?v=3","gravatar_id":"","url":"https://api.github.com/users/sbromberger","html_url":"https://github.com/sbromberger","followers_url":"https://api.github.com/users/sbromberger/followers","following_url":"https://api.github.com/users/sbromberger/following{/other_user}","gists_url":"https://api.github.com/users/sbromberger/gists{/gist_id}","starred_url":"https://api.github.com/users/sbromberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbromberger/subscriptions","organizations_url":"https://api.github.com/users/sbromberger/orgs","repos_url":"https://api.github.com/users/sbromberger/repos","events_url":"https://api.github.com/users/sbromberger/events{/privacy}","received_events_url":"https://api.github.com/users/sbromberger/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T18:41:05Z","updated_at":"2015-03-26T18:41:05Z","body":"I'm ok with it. I'm using StatsBase already for some sampling stuff for `betweenness_centrality` though. Perhaps we can consolidate?"}}