{"action":"created","comment":{"url":"https://api.github.com/repos/networkx/networkx/pulls/comments/81285365","pull_request_review_id":2275551,"id":81285365,"diff_hunk":"@@ -46,29 +48,66 @@ def strategy_random_sequential(G, colors):\n     return nodes\n \n \n-# TODO There is a faster implementation of this algorithm: keep track of\n-# the degrees and update them manually each time a node is removed.\n def strategy_smallest_last(G, colors):\n     \"\"\"Returns a list of the nodes of ``G``, \"smallest\" last.\n \n-    Specifically, the node of minimum degree is repeatedly popped from\n-    the graph, then this order is reversed.\n+    Specifically, the degrees of each node are tracked. From this,\n+    the node of minimum degree is repeatedly popped from the graph,\n+    updating its neighbors' degrees, then this order is reversed. \n \n     ``G`` is a NetworkX graph. ``colors`` is ignored.\n \n-    This implementation of the strategy runs in `O(n^2)` time.\n+    This implementation of the strategy runs in `O(|V| + |E|)` time.\n \n     This strategy is related to :func:`strategy_independent_set`: if we\n     interpret each node removed as an independent set of size one, then\n     this strategy chooses an independent set of size one instead of a\n     maximal independent set.\n \n+    A previous version of networkx noted that this faster algorithm","path":"networkx/algorithms/coloring/greedy_coloring.py","position":null,"original_position":43,"commit_id":"976ae17521ee7ce711bd800a62726b9f5e0fcfcf","original_commit_id":"79b9a1edcd8627e88d9a928eacf404a3ef306d55","user":{"login":"aryamccarthy","id":5395205,"avatar_url":"https://avatars.githubusercontent.com/u/5395205?v=3","gravatar_id":"","url":"https://api.github.com/users/aryamccarthy","html_url":"https://github.com/aryamccarthy","followers_url":"https://api.github.com/users/aryamccarthy/followers","following_url":"https://api.github.com/users/aryamccarthy/following{/other_user}","gists_url":"https://api.github.com/users/aryamccarthy/gists{/gist_id}","starred_url":"https://api.github.com/users/aryamccarthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryamccarthy/subscriptions","organizations_url":"https://api.github.com/users/aryamccarthy/orgs","repos_url":"https://api.github.com/users/aryamccarthy/repos","events_url":"https://api.github.com/users/aryamccarthy/events{/privacy}","received_events_url":"https://api.github.com/users/aryamccarthy/received_events","type":"User","site_admin":false},"body":"Fixed in 976ae17.","created_at":"2016-09-30T06:42:00Z","updated_at":"2016-09-30T06:42:00Z","html_url":"https://github.com/networkx/networkx/pull/2268#discussion_r81285365","pull_request_url":"https://api.github.com/repos/networkx/networkx/pulls/2268","_links":{"self":{"href":"https://api.github.com/repos/networkx/networkx/pulls/comments/81285365"},"html":{"href":"https://github.com/networkx/networkx/pull/2268#discussion_r81285365"},"pull_request":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2268"}}},"pull_request":{"url":"https://api.github.com/repos/networkx/networkx/pulls/2268","id":87428817,"html_url":"https://github.com/networkx/networkx/pull/2268","diff_url":"https://github.com/networkx/networkx/pull/2268.diff","patch_url":"https://github.com/networkx/networkx/pull/2268.patch","issue_url":"https://api.github.com/repos/networkx/networkx/issues/2268","number":2268,"state":"open","locked":false,"title":"Added faster smallest-last algorithm implementation.","user":{"login":"aryamccarthy","id":5395205,"avatar_url":"https://avatars.githubusercontent.com/u/5395205?v=3","gravatar_id":"","url":"https://api.github.com/users/aryamccarthy","html_url":"https://github.com/aryamccarthy","followers_url":"https://api.github.com/users/aryamccarthy/followers","following_url":"https://api.github.com/users/aryamccarthy/following{/other_user}","gists_url":"https://api.github.com/users/aryamccarthy/gists{/gist_id}","starred_url":"https://api.github.com/users/aryamccarthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryamccarthy/subscriptions","organizations_url":"https://api.github.com/users/aryamccarthy/orgs","repos_url":"https://api.github.com/users/aryamccarthy/repos","events_url":"https://api.github.com/users/aryamccarthy/events{/privacy}","received_events_url":"https://api.github.com/users/aryamccarthy/received_events","type":"User","site_admin":false},"body":"Implementation used degree lists to track updates to the ever-shrinking graph.\r\nThis reduced time from O(|V|^2) to O(|V|+|E|). \r\n\r\nBecause this was a replacement for the existing algorithm, instead of new functionality, no tests were added. This build passes all of the existing tests for smallest-last strategy.","created_at":"2016-09-30T03:23:50Z","updated_at":"2016-09-30T06:42:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c977c849e1c98ad4545de33413ded4579493861e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/networkx/networkx/pulls/2268/commits","review_comments_url":"https://api.github.com/repos/networkx/networkx/pulls/2268/comments","review_comment_url":"https://api.github.com/repos/networkx/networkx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/networkx/networkx/issues/2268/comments","statuses_url":"https://api.github.com/repos/networkx/networkx/statuses/976ae17521ee7ce711bd800a62726b9f5e0fcfcf","head":{"label":"aryamccarthy:fast-smallest-last","ref":"fast-smallest-last","sha":"976ae17521ee7ce711bd800a62726b9f5e0fcfcf","user":{"login":"aryamccarthy","id":5395205,"avatar_url":"https://avatars.githubusercontent.com/u/5395205?v=3","gravatar_id":"","url":"https://api.github.com/users/aryamccarthy","html_url":"https://github.com/aryamccarthy","followers_url":"https://api.github.com/users/aryamccarthy/followers","following_url":"https://api.github.com/users/aryamccarthy/following{/other_user}","gists_url":"https://api.github.com/users/aryamccarthy/gists{/gist_id}","starred_url":"https://api.github.com/users/aryamccarthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryamccarthy/subscriptions","organizations_url":"https://api.github.com/users/aryamccarthy/orgs","repos_url":"https://api.github.com/users/aryamccarthy/repos","events_url":"https://api.github.com/users/aryamccarthy/events{/privacy}","received_events_url":"https://api.github.com/users/aryamccarthy/received_events","type":"User","site_admin":false},"repo":{"id":69579182,"name":"networkx","full_name":"aryamccarthy/networkx","owner":{"login":"aryamccarthy","id":5395205,"avatar_url":"https://avatars.githubusercontent.com/u/5395205?v=3","gravatar_id":"","url":"https://api.github.com/users/aryamccarthy","html_url":"https://github.com/aryamccarthy","followers_url":"https://api.github.com/users/aryamccarthy/followers","following_url":"https://api.github.com/users/aryamccarthy/following{/other_user}","gists_url":"https://api.github.com/users/aryamccarthy/gists{/gist_id}","starred_url":"https://api.github.com/users/aryamccarthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aryamccarthy/subscriptions","organizations_url":"https://api.github.com/users/aryamccarthy/orgs","repos_url":"https://api.github.com/users/aryamccarthy/repos","events_url":"https://api.github.com/users/aryamccarthy/events{/privacy}","received_events_url":"https://api.github.com/users/aryamccarthy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aryamccarthy/networkx","description":"Official NetworkX source code repository.  ","fork":true,"url":"https://api.github.com/repos/aryamccarthy/networkx","forks_url":"https://api.github.com/repos/aryamccarthy/networkx/forks","keys_url":"https://api.github.com/repos/aryamccarthy/networkx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aryamccarthy/networkx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aryamccarthy/networkx/teams","hooks_url":"https://api.github.com/repos/aryamccarthy/networkx/hooks","issue_events_url":"https://api.github.com/repos/aryamccarthy/networkx/issues/events{/number}","events_url":"https://api.github.com/repos/aryamccarthy/networkx/events","assignees_url":"https://api.github.com/repos/aryamccarthy/networkx/assignees{/user}","branches_url":"https://api.github.com/repos/aryamccarthy/networkx/branches{/branch}","tags_url":"https://api.github.com/repos/aryamccarthy/networkx/tags","blobs_url":"https://api.github.com/repos/aryamccarthy/networkx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aryamccarthy/networkx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aryamccarthy/networkx/git/refs{/sha}","trees_url":"https://api.github.com/repos/aryamccarthy/networkx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aryamccarthy/networkx/statuses/{sha}","languages_url":"https://api.github.com/repos/aryamccarthy/networkx/languages","stargazers_url":"https://api.github.com/repos/aryamccarthy/networkx/stargazers","contributors_url":"https://api.github.com/repos/aryamccarthy/networkx/contributors","subscribers_url":"https://api.github.com/repos/aryamccarthy/networkx/subscribers","subscription_url":"https://api.github.com/repos/aryamccarthy/networkx/subscription","commits_url":"https://api.github.com/repos/aryamccarthy/networkx/commits{/sha}","git_commits_url":"https://api.github.com/repos/aryamccarthy/networkx/git/commits{/sha}","comments_url":"https://api.github.com/repos/aryamccarthy/networkx/comments{/number}","issue_comment_url":"https://api.github.com/repos/aryamccarthy/networkx/issues/comments{/number}","contents_url":"https://api.github.com/repos/aryamccarthy/networkx/contents/{+path}","compare_url":"https://api.github.com/repos/aryamccarthy/networkx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aryamccarthy/networkx/merges","archive_url":"https://api.github.com/repos/aryamccarthy/networkx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aryamccarthy/networkx/downloads","issues_url":"https://api.github.com/repos/aryamccarthy/networkx/issues{/number}","pulls_url":"https://api.github.com/repos/aryamccarthy/networkx/pulls{/number}","milestones_url":"https://api.github.com/repos/aryamccarthy/networkx/milestones{/number}","notifications_url":"https://api.github.com/repos/aryamccarthy/networkx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aryamccarthy/networkx/labels{/name}","releases_url":"https://api.github.com/repos/aryamccarthy/networkx/releases{/id}","deployments_url":"https://api.github.com/repos/aryamccarthy/networkx/deployments","created_at":"2016-09-29T15:07:42Z","updated_at":"2016-09-29T15:07:45Z","pushed_at":"2016-09-30T06:34:43Z","git_url":"git://github.com/aryamccarthy/networkx.git","ssh_url":"git@github.com:aryamccarthy/networkx.git","clone_url":"https://github.com/aryamccarthy/networkx.git","svn_url":"https://github.com/aryamccarthy/networkx","homepage":"http://networkx.github.io","size":10684,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"networkx:master","ref":"master","sha":"6e20b952a957af820990f68d9237609198088816","user":{"login":"networkx","id":388785,"avatar_url":"https://avatars.githubusercontent.com/u/388785?v=3","gravatar_id":"","url":"https://api.github.com/users/networkx","html_url":"https://github.com/networkx","followers_url":"https://api.github.com/users/networkx/followers","following_url":"https://api.github.com/users/networkx/following{/other_user}","gists_url":"https://api.github.com/users/networkx/gists{/gist_id}","starred_url":"https://api.github.com/users/networkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/networkx/subscriptions","organizations_url":"https://api.github.com/users/networkx/orgs","repos_url":"https://api.github.com/users/networkx/repos","events_url":"https://api.github.com/users/networkx/events{/privacy}","received_events_url":"https://api.github.com/users/networkx/received_events","type":"Organization","site_admin":false},"repo":{"id":890377,"name":"networkx","full_name":"networkx/networkx","owner":{"login":"networkx","id":388785,"avatar_url":"https://avatars.githubusercontent.com/u/388785?v=3","gravatar_id":"","url":"https://api.github.com/users/networkx","html_url":"https://github.com/networkx","followers_url":"https://api.github.com/users/networkx/followers","following_url":"https://api.github.com/users/networkx/following{/other_user}","gists_url":"https://api.github.com/users/networkx/gists{/gist_id}","starred_url":"https://api.github.com/users/networkx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/networkx/subscriptions","organizations_url":"https://api.github.com/users/networkx/orgs","repos_url":"https://api.github.com/users/networkx/repos","events_url":"https://api.github.com/users/networkx/events{/privacy}","received_events_url":"https://api.github.com/users/networkx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/networkx/networkx","description":"Official NetworkX source code repository.  ","fork":false,"url":"https://api.github.com/repos/networkx/networkx","forks_url":"https://api.github.com/repos/networkx/networkx/forks","keys_url":"https://api.github.com/repos/networkx/networkx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/networkx/networkx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/networkx/networkx/teams","hooks_url":"https://api.github.com/repos/networkx/networkx/hooks","issue_events_url":"https://api.github.com/repos/networkx/networkx/issues/events{/number}","events_url":"https://api.github.com/repos/networkx/networkx/events","assignees_url":"https://api.github.com/repos/networkx/networkx/assignees{/user}","branches_url":"https://api.github.com/repos/networkx/networkx/branches{/branch}","tags_url":"https://api.github.com/repos/networkx/networkx/tags","blobs_url":"https://api.github.com/repos/networkx/networkx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/networkx/networkx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/networkx/networkx/git/refs{/sha}","trees_url":"https://api.github.com/repos/networkx/networkx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/networkx/networkx/statuses/{sha}","languages_url":"https://api.github.com/repos/networkx/networkx/languages","stargazers_url":"https://api.github.com/repos/networkx/networkx/stargazers","contributors_url":"https://api.github.com/repos/networkx/networkx/contributors","subscribers_url":"https://api.github.com/repos/networkx/networkx/subscribers","subscription_url":"https://api.github.com/repos/networkx/networkx/subscription","commits_url":"https://api.github.com/repos/networkx/networkx/commits{/sha}","git_commits_url":"https://api.github.com/repos/networkx/networkx/git/commits{/sha}","comments_url":"https://api.github.com/repos/networkx/networkx/comments{/number}","issue_comment_url":"https://api.github.com/repos/networkx/networkx/issues/comments{/number}","contents_url":"https://api.github.com/repos/networkx/networkx/contents/{+path}","compare_url":"https://api.github.com/repos/networkx/networkx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/networkx/networkx/merges","archive_url":"https://api.github.com/repos/networkx/networkx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/networkx/networkx/downloads","issues_url":"https://api.github.com/repos/networkx/networkx/issues{/number}","pulls_url":"https://api.github.com/repos/networkx/networkx/pulls{/number}","milestones_url":"https://api.github.com/repos/networkx/networkx/milestones{/number}","notifications_url":"https://api.github.com/repos/networkx/networkx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/networkx/networkx/labels{/name}","releases_url":"https://api.github.com/repos/networkx/networkx/releases{/id}","deployments_url":"https://api.github.com/repos/networkx/networkx/deployments","created_at":"2010-09-06T00:53:44Z","updated_at":"2016-09-30T06:33:44Z","pushed_at":"2016-09-30T06:34:45Z","git_url":"git://github.com/networkx/networkx.git","ssh_url":"git@github.com:networkx/networkx.git","clone_url":"https://github.com/networkx/networkx.git","svn_url":"https://github.com/networkx/networkx","homepage":"http://networkx.github.io","size":18274,"stargazers_count":2394,"watchers_count":2394,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":752,"mirror_url":null,"open_issues_count":303,"forks":752,"open_issues":303,"watchers":2394,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2268"},"html":{"href":"https://github.com/networkx/networkx/pull/2268"},"issue":{"href":"https://api.github.com/repos/networkx/networkx/issues/2268"},"comments":{"href":"https://api.github.com/repos/networkx/networkx/issues/2268/comments"},"review_comments":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2268/comments"},"review_comment":{"href":"https://api.github.com/repos/networkx/networkx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/networkx/networkx/pulls/2268/commits"},"statuses":{"href":"https://api.github.com/repos/networkx/networkx/statuses/976ae17521ee7ce711bd800a62726b9f5e0fcfcf"}}}}
{"actor":{"display_login":"aryamccarthy"}}