{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/comments/140001317","pull_request_review_id":64012265,"id":140001317,"diff_hunk":"@@ -116,6 +116,61 @@ function add_edge!(g::SimpleDiGraph, e::SimpleDiGraphEdge)\n end\n \n \n+function add_edges!(g::SimpleDiGraph, es)\n+    T = eltype(g)\n+    nvnew = nvold = nv(g)\n+    neold = ne(g)\n+    ftouched = falses(nvold)\n+    btouched = falses(nvold)\n+\n+    for e in es\n+        s, d = T.(Tuple(e))\n+        if s < 1 || d < 1\n+            error(\"Nonpositive vertex number\")","path":"src/graphtypes/simplegraphs/simpledigraph.jl","position":14,"original_position":14,"commit_id":"72396329101a0213aac9c15c6fded1a3b98da5b0","original_commit_id":"72396329101a0213aac9c15c6fded1a3b98da5b0","user":{"login":"sbromberger","id":941359,"avatar_url":"https://avatars0.githubusercontent.com/u/941359?v=4","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},"body":"> Putting too much faith into a single principle hinders more than it helps.\r\n\r\nWith respect, it's one of our three core tenets of LightGraphs (the others being \"simple\" and \"performant\") that have served us very well. I am not open to revisiting its utility.\r\n\r\n> `add_edges!` is not the same as multiple calls to `add_edge!`\r\n\r\nFor one specific graph type, this may be true. But it may not be true for other graph types, nor is it consistent with `add_vertices!` vs `add_vertex!`.\r\n\r\n> `add_edges!` would become very unuseful if it would not implicitly add vertices\r\n\r\nThis is one thing that bothers me. I'm leaning towards suggesting a different name for this function as a result.","created_at":"2017-09-20T15:16:42Z","updated_at":"2017-09-20T15:16:42Z","html_url":"https://github.com/JuliaGraphs/LightGraphs.jl/pull/755#discussion_r140001317","pull_request_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/comments/140001317"},"html":{"href":"https://github.com/JuliaGraphs/LightGraphs.jl/pull/755#discussion_r140001317"},"pull_request":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755"}},"in_reply_to_id":139498851},"pull_request":{"url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755","id":141500191,"html_url":"https://github.com/JuliaGraphs/LightGraphs.jl/pull/755","diff_url":"https://github.com/JuliaGraphs/LightGraphs.jl/pull/755.diff","patch_url":"https://github.com/JuliaGraphs/LightGraphs.jl/pull/755.patch","issue_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/755","number":755,"state":"open","locked":false,"title":"Add add_edges!","user":{"login":"mschauer","id":1923437,"avatar_url":"https://avatars1.githubusercontent.com/u/1923437?v=4","gravatar_id":"","url":"https://api.github.com/users/mschauer","html_url":"https://github.com/mschauer","followers_url":"https://api.github.com/users/mschauer/followers","following_url":"https://api.github.com/users/mschauer/following{/other_user}","gists_url":"https://api.github.com/users/mschauer/gists{/gist_id}","starred_url":"https://api.github.com/users/mschauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mschauer/subscriptions","organizations_url":"https://api.github.com/users/mschauer/orgs","repos_url":"https://api.github.com/users/mschauer/repos","events_url":"https://api.github.com/users/mschauer/events{/privacy}","received_events_url":"https://api.github.com/users/mschauer/received_events","type":"User","site_admin":false},"body":"As observed, adding many edges has efficiency of insertion sort, these are specialized methods only sorting and unifying after adding many edges. Only newer versions have `unique!` with a fast code path for sorted data. Still, sorting and unique together are still `n log(n)` and not `n^2`","created_at":"2017-09-17T20:01:45Z","updated_at":"2017-09-20T15:16:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f66c9fa2eaf80f785b13477ac11b447fc9f33691","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755/commits","review_comments_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755/comments","review_comment_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/755/comments","statuses_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/statuses/72396329101a0213aac9c15c6fded1a3b98da5b0","head":{"label":"mschauer:add_edges","ref":"add_edges","sha":"72396329101a0213aac9c15c6fded1a3b98da5b0","user":{"login":"mschauer","id":1923437,"avatar_url":"https://avatars1.githubusercontent.com/u/1923437?v=4","gravatar_id":"","url":"https://api.github.com/users/mschauer","html_url":"https://github.com/mschauer","followers_url":"https://api.github.com/users/mschauer/followers","following_url":"https://api.github.com/users/mschauer/following{/other_user}","gists_url":"https://api.github.com/users/mschauer/gists{/gist_id}","starred_url":"https://api.github.com/users/mschauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mschauer/subscriptions","organizations_url":"https://api.github.com/users/mschauer/orgs","repos_url":"https://api.github.com/users/mschauer/repos","events_url":"https://api.github.com/users/mschauer/events{/privacy}","received_events_url":"https://api.github.com/users/mschauer/received_events","type":"User","site_admin":false},"repo":{"id":98998930,"name":"LightGraphs.jl","full_name":"mschauer/LightGraphs.jl","owner":{"login":"mschauer","id":1923437,"avatar_url":"https://avatars1.githubusercontent.com/u/1923437?v=4","gravatar_id":"","url":"https://api.github.com/users/mschauer","html_url":"https://github.com/mschauer","followers_url":"https://api.github.com/users/mschauer/followers","following_url":"https://api.github.com/users/mschauer/following{/other_user}","gists_url":"https://api.github.com/users/mschauer/gists{/gist_id}","starred_url":"https://api.github.com/users/mschauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mschauer/subscriptions","organizations_url":"https://api.github.com/users/mschauer/orgs","repos_url":"https://api.github.com/users/mschauer/repos","events_url":"https://api.github.com/users/mschauer/events{/privacy}","received_events_url":"https://api.github.com/users/mschauer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mschauer/LightGraphs.jl","description":"An optimized graphs package for Julia","fork":true,"url":"https://api.github.com/repos/mschauer/LightGraphs.jl","forks_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/forks","keys_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/teams","hooks_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/hooks","issue_events_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/issues/events{/number}","events_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/events","assignees_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/assignees{/user}","branches_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/branches{/branch}","tags_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/tags","blobs_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/languages","stargazers_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/stargazers","contributors_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/contributors","subscribers_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/subscribers","subscription_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/subscription","commits_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/contents/{+path}","compare_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/merges","archive_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/downloads","issues_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/issues{/number}","pulls_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/labels{/name}","releases_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/releases{/id}","deployments_url":"https://api.github.com/repos/mschauer/LightGraphs.jl/deployments","created_at":"2017-08-01T12:28:42Z","updated_at":"2017-08-01T12:28:44Z","pushed_at":"2017-09-18T15:38:05Z","git_url":"git://github.com/mschauer/LightGraphs.jl.git","ssh_url":"git@github.com:mschauer/LightGraphs.jl.git","clone_url":"https://github.com/mschauer/LightGraphs.jl.git","svn_url":"https://github.com/mschauer/LightGraphs.jl","homepage":"","size":6876,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"JuliaGraphs:master","ref":"master","sha":"27baf044eff44e4e1ce9c2f9d3cff68faa440d2e","user":{"login":"JuliaGraphs","id":10791402,"avatar_url":"https://avatars0.githubusercontent.com/u/10791402?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaGraphs","html_url":"https://github.com/JuliaGraphs","followers_url":"https://api.github.com/users/JuliaGraphs/followers","following_url":"https://api.github.com/users/JuliaGraphs/following{/other_user}","gists_url":"https://api.github.com/users/JuliaGraphs/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaGraphs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaGraphs/subscriptions","organizations_url":"https://api.github.com/users/JuliaGraphs/orgs","repos_url":"https://api.github.com/users/JuliaGraphs/repos","events_url":"https://api.github.com/users/JuliaGraphs/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaGraphs/received_events","type":"Organization","site_admin":false},"repo":{"id":29314835,"name":"LightGraphs.jl","full_name":"JuliaGraphs/LightGraphs.jl","owner":{"login":"JuliaGraphs","id":10791402,"avatar_url":"https://avatars0.githubusercontent.com/u/10791402?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaGraphs","html_url":"https://github.com/JuliaGraphs","followers_url":"https://api.github.com/users/JuliaGraphs/followers","following_url":"https://api.github.com/users/JuliaGraphs/following{/other_user}","gists_url":"https://api.github.com/users/JuliaGraphs/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaGraphs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaGraphs/subscriptions","organizations_url":"https://api.github.com/users/JuliaGraphs/orgs","repos_url":"https://api.github.com/users/JuliaGraphs/repos","events_url":"https://api.github.com/users/JuliaGraphs/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaGraphs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/JuliaGraphs/LightGraphs.jl","description":"An optimized graphs package for Julia","fork":false,"url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl","forks_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/forks","keys_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/teams","hooks_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/events","assignees_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/tags","blobs_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/subscription","commits_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/merges","archive_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/downloads","issues_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/deployments","created_at":"2015-01-15T19:44:43Z","updated_at":"2017-09-19T06:45:37Z","pushed_at":"2017-09-19T19:58:34Z","git_url":"git://github.com/JuliaGraphs/LightGraphs.jl.git","ssh_url":"git@github.com:JuliaGraphs/LightGraphs.jl.git","clone_url":"https://github.com/JuliaGraphs/LightGraphs.jl.git","svn_url":"https://github.com/JuliaGraphs/LightGraphs.jl","homepage":"","size":7048,"stargazers_count":138,"watchers_count":138,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":57,"mirror_url":null,"open_issues_count":26,"forks":57,"open_issues":26,"watchers":138,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755"},"html":{"href":"https://github.com/JuliaGraphs/LightGraphs.jl/pull/755"},"issue":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/755"},"comments":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/issues/755/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/pulls/755/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaGraphs/LightGraphs.jl/statuses/72396329101a0213aac9c15c6fded1a3b98da5b0"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sbromberger"}}