{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/cassovary/pulls/comments/23650060","id":23650060,"diff_hunk":"@@ -273,9 +289,15 @@ trait Node {\n \n object Node {\n   private lazy val randGen: Random = new Random\n-  def apply(nodeId: Int, out: Seq[Int], in: Seq[Int]) = new Node {\n-    val id = nodeId\n-    def inboundNodes() = in\n-    def outboundNodes() = out\n+\n+  def apply(nodeId: Int, out: Seq[Int], in: Seq[Int]): Node = {\n+    new SeqBasedNode(nodeId, in, out)\n+  }\n+\n+  def withSortedNeighbors(nodeId: Int, in: Array[Int], out: Array[Int]) = {\n+    new SeqBasedNode(nodeId, in, out) with SortedNeighborsNodeOps\n   }\n }\n+\n+class SeqBasedNode private[graph] (val id: Int, val inboundNodes: Seq[Int], val outboundNodes: Seq[Int])","path":"cassovary-core/src/main/scala/com/twitter/cassovary/graph/Node.scala","position":48,"original_position":48,"commit_id":"bc8af096ecbed682c69db13b9c6a31b9d8df338b","original_commit_id":"bc8af096ecbed682c69db13b9c6a31b9d8df338b","user":{"login":"pankajgupta","id":71128,"avatar_url":"https://avatars.githubusercontent.com/u/71128?v=3","gravatar_id":"","url":"https://api.github.com/users/pankajgupta","html_url":"https://github.com/pankajgupta","followers_url":"https://api.github.com/users/pankajgupta/followers","following_url":"https://api.github.com/users/pankajgupta/following{/other_user}","gists_url":"https://api.github.com/users/pankajgupta/gists{/gist_id}","starred_url":"https://api.github.com/users/pankajgupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pankajgupta/subscriptions","organizations_url":"https://api.github.com/users/pankajgupta/orgs","repos_url":"https://api.github.com/users/pankajgupta/repos","events_url":"https://api.github.com/users/pankajgupta/events{/privacy}","received_events_url":"https://api.github.com/users/pankajgupta/received_events","type":"User","site_admin":false},"body":"not sure I like this. SeqBasedNode is really just the same as Node (with no added or reduced functionality), so may be we should just make the trait Node to be an abstract class?\r\n","created_at":"2015-01-27T22:40:37Z","updated_at":"2015-01-27T22:40:37Z","html_url":"https://github.com/twitter/cassovary/pull/133#discussion_r23650060","pull_request_url":"https://api.github.com/repos/twitter/cassovary/pulls/133","_links":{"self":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/comments/23650060"},"html":{"href":"https://github.com/twitter/cassovary/pull/133#discussion_r23650060"},"pull_request":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/cassovary/pulls/133","id":27991404,"html_url":"https://github.com/twitter/cassovary/pull/133","diff_url":"https://github.com/twitter/cassovary/pull/133.diff","patch_url":"https://github.com/twitter/cassovary/pull/133.patch","issue_url":"https://api.github.com/repos/twitter/cassovary/issues/133","number":133,"state":"open","locked":false,"title":"Resolves #110.","user":{"login":"szymonm","id":5087912,"avatar_url":"https://avatars.githubusercontent.com/u/5087912?v=3","gravatar_id":"","url":"https://api.github.com/users/szymonm","html_url":"https://github.com/szymonm","followers_url":"https://api.github.com/users/szymonm/followers","following_url":"https://api.github.com/users/szymonm/following{/other_user}","gists_url":"https://api.github.com/users/szymonm/gists{/gist_id}","starred_url":"https://api.github.com/users/szymonm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szymonm/subscriptions","organizations_url":"https://api.github.com/users/szymonm/orgs","repos_url":"https://api.github.com/users/szymonm/repos","events_url":"https://api.github.com/users/szymonm/events{/privacy}","received_events_url":"https://api.github.com/users/szymonm/received_events","type":"User","site_admin":false},"body":"Allows nodes that store neighbors sorted in ArrayBasedGraph","created_at":"2015-01-25T12:28:38Z","updated_at":"2015-01-27T22:40:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2e19163eede216df04ad81bc0a38b06e28328ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twitter/cassovary/pulls/133/commits","review_comments_url":"https://api.github.com/repos/twitter/cassovary/pulls/133/comments","review_comment_url":"https://api.github.com/repos/twitter/cassovary/pulls/comments/{number}","comments_url":"https://api.github.com/repos/twitter/cassovary/issues/133/comments","statuses_url":"https://api.github.com/repos/twitter/cassovary/statuses/bc8af096ecbed682c69db13b9c6a31b9d8df338b","head":{"label":"szymonm:sortedNeighbors","ref":"sortedNeighbors","sha":"bc8af096ecbed682c69db13b9c6a31b9d8df338b","user":{"login":"szymonm","id":5087912,"avatar_url":"https://avatars.githubusercontent.com/u/5087912?v=3","gravatar_id":"","url":"https://api.github.com/users/szymonm","html_url":"https://github.com/szymonm","followers_url":"https://api.github.com/users/szymonm/followers","following_url":"https://api.github.com/users/szymonm/following{/other_user}","gists_url":"https://api.github.com/users/szymonm/gists{/gist_id}","starred_url":"https://api.github.com/users/szymonm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szymonm/subscriptions","organizations_url":"https://api.github.com/users/szymonm/orgs","repos_url":"https://api.github.com/users/szymonm/repos","events_url":"https://api.github.com/users/szymonm/events{/privacy}","received_events_url":"https://api.github.com/users/szymonm/received_events","type":"User","site_admin":false},"repo":{"id":17590418,"name":"cassovary","full_name":"szymonm/cassovary","owner":{"login":"szymonm","id":5087912,"avatar_url":"https://avatars.githubusercontent.com/u/5087912?v=3","gravatar_id":"","url":"https://api.github.com/users/szymonm","html_url":"https://github.com/szymonm","followers_url":"https://api.github.com/users/szymonm/followers","following_url":"https://api.github.com/users/szymonm/following{/other_user}","gists_url":"https://api.github.com/users/szymonm/gists{/gist_id}","starred_url":"https://api.github.com/users/szymonm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szymonm/subscriptions","organizations_url":"https://api.github.com/users/szymonm/orgs","repos_url":"https://api.github.com/users/szymonm/repos","events_url":"https://api.github.com/users/szymonm/events{/privacy}","received_events_url":"https://api.github.com/users/szymonm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/szymonm/cassovary","description":"Cassovary is a simple big graph processing library for the JVM","fork":true,"url":"https://api.github.com/repos/szymonm/cassovary","forks_url":"https://api.github.com/repos/szymonm/cassovary/forks","keys_url":"https://api.github.com/repos/szymonm/cassovary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szymonm/cassovary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szymonm/cassovary/teams","hooks_url":"https://api.github.com/repos/szymonm/cassovary/hooks","issue_events_url":"https://api.github.com/repos/szymonm/cassovary/issues/events{/number}","events_url":"https://api.github.com/repos/szymonm/cassovary/events","assignees_url":"https://api.github.com/repos/szymonm/cassovary/assignees{/user}","branches_url":"https://api.github.com/repos/szymonm/cassovary/branches{/branch}","tags_url":"https://api.github.com/repos/szymonm/cassovary/tags","blobs_url":"https://api.github.com/repos/szymonm/cassovary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szymonm/cassovary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szymonm/cassovary/git/refs{/sha}","trees_url":"https://api.github.com/repos/szymonm/cassovary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szymonm/cassovary/statuses/{sha}","languages_url":"https://api.github.com/repos/szymonm/cassovary/languages","stargazers_url":"https://api.github.com/repos/szymonm/cassovary/stargazers","contributors_url":"https://api.github.com/repos/szymonm/cassovary/contributors","subscribers_url":"https://api.github.com/repos/szymonm/cassovary/subscribers","subscription_url":"https://api.github.com/repos/szymonm/cassovary/subscription","commits_url":"https://api.github.com/repos/szymonm/cassovary/commits{/sha}","git_commits_url":"https://api.github.com/repos/szymonm/cassovary/git/commits{/sha}","comments_url":"https://api.github.com/repos/szymonm/cassovary/comments{/number}","issue_comment_url":"https://api.github.com/repos/szymonm/cassovary/issues/comments/{number}","contents_url":"https://api.github.com/repos/szymonm/cassovary/contents/{+path}","compare_url":"https://api.github.com/repos/szymonm/cassovary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szymonm/cassovary/merges","archive_url":"https://api.github.com/repos/szymonm/cassovary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szymonm/cassovary/downloads","issues_url":"https://api.github.com/repos/szymonm/cassovary/issues{/number}","pulls_url":"https://api.github.com/repos/szymonm/cassovary/pulls{/number}","milestones_url":"https://api.github.com/repos/szymonm/cassovary/milestones{/number}","notifications_url":"https://api.github.com/repos/szymonm/cassovary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szymonm/cassovary/labels{/name}","releases_url":"https://api.github.com/repos/szymonm/cassovary/releases{/id}","created_at":"2014-03-10T11:24:08Z","updated_at":"2015-01-25T10:45:13Z","pushed_at":"2015-01-27T17:37:00Z","git_url":"git://github.com/szymonm/cassovary.git","ssh_url":"git@github.com:szymonm/cassovary.git","clone_url":"https://github.com/szymonm/cassovary.git","svn_url":"https://github.com/szymonm/cassovary","homepage":"http://twitter.com/cassovary","size":3282,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"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":"twitter:master","ref":"master","sha":"004f2ac8fbbd014c8627fd1a7ff77b1338af40cc","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":3509388,"name":"cassovary","full_name":"twitter/cassovary","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/cassovary","description":"Cassovary is a simple big graph processing library for the JVM","fork":false,"url":"https://api.github.com/repos/twitter/cassovary","forks_url":"https://api.github.com/repos/twitter/cassovary/forks","keys_url":"https://api.github.com/repos/twitter/cassovary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/cassovary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/cassovary/teams","hooks_url":"https://api.github.com/repos/twitter/cassovary/hooks","issue_events_url":"https://api.github.com/repos/twitter/cassovary/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/cassovary/events","assignees_url":"https://api.github.com/repos/twitter/cassovary/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/cassovary/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/cassovary/tags","blobs_url":"https://api.github.com/repos/twitter/cassovary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/cassovary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/cassovary/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/cassovary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/cassovary/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/cassovary/languages","stargazers_url":"https://api.github.com/repos/twitter/cassovary/stargazers","contributors_url":"https://api.github.com/repos/twitter/cassovary/contributors","subscribers_url":"https://api.github.com/repos/twitter/cassovary/subscribers","subscription_url":"https://api.github.com/repos/twitter/cassovary/subscription","commits_url":"https://api.github.com/repos/twitter/cassovary/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/cassovary/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/cassovary/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/cassovary/issues/comments/{number}","contents_url":"https://api.github.com/repos/twitter/cassovary/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/cassovary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/cassovary/merges","archive_url":"https://api.github.com/repos/twitter/cassovary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/cassovary/downloads","issues_url":"https://api.github.com/repos/twitter/cassovary/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/cassovary/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/cassovary/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/cassovary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/cassovary/labels{/name}","releases_url":"https://api.github.com/repos/twitter/cassovary/releases{/id}","created_at":"2012-02-21T23:22:30Z","updated_at":"2015-01-27T20:26:13Z","pushed_at":"2015-01-26T18:57:08Z","git_url":"git://github.com/twitter/cassovary.git","ssh_url":"git@github.com:twitter/cassovary.git","clone_url":"https://github.com/twitter/cassovary.git","svn_url":"https://github.com/twitter/cassovary","homepage":"http://twitter.com/cassovary","size":4163,"stargazers_count":677,"watchers_count":677,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":13,"forks":85,"open_issues":13,"watchers":677,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/133"},"html":{"href":"https://github.com/twitter/cassovary/pull/133"},"issue":{"href":"https://api.github.com/repos/twitter/cassovary/issues/133"},"comments":{"href":"https://api.github.com/repos/twitter/cassovary/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/cassovary/statuses/bc8af096ecbed682c69db13b9c6a31b9d8df338b"}}}}