{"action":"created","comment":{"url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments/55292101","id":55292101,"diff_hunk":"@@ -37,38 +36,38 @@ object BlockVTK {\n     // vertical line running through this center.\n     // Check if points are on opposite sides of the center. Points left of center will be before points\n     // right of the center\n-    if ((pointA._1 - center._1 < -NumericUtils.EPSILON) && (pointB._1 - center._1 >= NumericUtils.EPSILON)) {\n+    if ((pointA(0) - center(0) < -NumericUtils.EPSILON) && (pointB(0) - center(0) >= NumericUtils.EPSILON)) {\n       return true\n     }\n-    else if ((pointA._1 - center._1 >= NumericUtils.EPSILON) && (pointB._1 - center._1 < -NumericUtils.EPSILON)) {\n+    else if ((pointA(0) - center(0) >= NumericUtils.EPSILON) && (pointB(0) - center(0) < -NumericUtils.EPSILON)) {\n       return false\n     }\n \n     // Compares points that fall on the x = center._1 line.\n-    if ((math.abs(pointA._1 - center._1) < NumericUtils.EPSILON) &&\n-        (math.abs(pointB._1 - center._1) < NumericUtils.EPSILON)) {\n+    if ((math.abs(pointA(0) - center(0)) < NumericUtils.EPSILON) &&\n+        (math.abs(pointB(0) - center(0)) < NumericUtils.EPSILON)) {\n       // Points furthest away from the center will be before points that are closer to the center\n-      if ((pointA._2 - center._2 >= NumericUtils.EPSILON) || (pointB._2 - center._2 >= NumericUtils.EPSILON)) {\n-        return pointA._2 > pointB._2\n+      if ((pointA(1) - center(1) >= NumericUtils.EPSILON) || (pointB(1) - center(1) >= NumericUtils.EPSILON)) {\n+        return pointA(1) > pointB(1)\n       } else {\n-        return pointB._2 > pointA._2\n+        return pointB(1) > pointA(1)\n       }      \n     }\n \n     // The cross product of vectors (pointA - center) and (pointB - center) in determinant form. Since it's\n     // in 2-D we're only interested in the sign of the resulting z-vector.\n-    val det = (pointA._1 - center._1) * (pointB._2 - center._2) -\n-      (pointB._1 - center._1) * (pointA._2 - center._2)\n+    val det = (pointA(0) - center(0)) * (pointB(1) - center(1)) -\n+      (pointB(0) - center(0)) * (pointA(1) - center(1))\n     // If resulting vector points in positive z-direction, pointA is before pointB\n     if (det > NumericUtils.EPSILON) {\n-      return true\n+      true\n     } else if (det < -NumericUtils.EPSILON) {\n-      return false\n+      false\n     } else {\n       // pointA and pointB are on the same line from the center, so check which one is closer to the center\n-      val d1 = (pointA._1 - center._1) * (pointA._1 - center._1) + (pointA._2 - center._2) * (pointA._2 - center._2)\n-      val d2 = (pointB._1 - center._1) * (pointB._1 - center._1) + (pointB._2 - center._2) * (pointB._2 - center._2)\n-      return d1 > d2\n+      val d1 = (pointA(0) - center(0)) * (pointA(0) - center(0)) + (pointA(1) - center(1)) * (pointA(1) - center(1))\n+      val d2 = (pointB(0) - center(0)) * (pointB(0) - center(0)) + (pointB(1) - center(1)) * (pointB(1) - center(1))\n+      d1 > d2\n     }","path":"src/main/scala/edu/berkeley/ce/rockslicing/BlockVTK.scala","position":90,"original_position":90,"commit_id":"4ab07b93f991ac537eca96d321365d2bb1a05f73","original_commit_id":"4ab07b93f991ac537eca96d321365d2bb1a05f73","user":{"login":"shellshocked2003","id":10856474,"avatar_url":"https://avatars.githubusercontent.com/u/10856474?v=3","gravatar_id":"","url":"https://api.github.com/users/shellshocked2003","html_url":"https://github.com/shellshocked2003","followers_url":"https://api.github.com/users/shellshocked2003/followers","following_url":"https://api.github.com/users/shellshocked2003/following{/other_user}","gists_url":"https://api.github.com/users/shellshocked2003/gists{/gist_id}","starred_url":"https://api.github.com/users/shellshocked2003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shellshocked2003/subscriptions","organizations_url":"https://api.github.com/users/shellshocked2003/orgs","repos_url":"https://api.github.com/users/shellshocked2003/repos","events_url":"https://api.github.com/users/shellshocked2003/events{/privacy}","received_events_url":"https://api.github.com/users/shellshocked2003/received_events","type":"User","site_admin":false},"body":"I see you changed your mind about explicitly putting `return`s here for readability :)","created_at":"2016-03-07T23:26:25Z","updated_at":"2016-03-07T23:26:25Z","html_url":"https://github.com/jKolb1/sparkRocks/pull/28#discussion_r55292101","pull_request_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments/55292101"},"html":{"href":"https://github.com/jKolb1/sparkRocks/pull/28#discussion_r55292101"},"pull_request":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28","id":61828414,"html_url":"https://github.com/jKolb1/sparkRocks/pull/28","diff_url":"https://github.com/jKolb1/sparkRocks/pull/28.diff","patch_url":"https://github.com/jKolb1/sparkRocks/pull/28.patch","issue_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/28","number":28,"state":"open","locked":false,"title":"Overflow","user":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"body":"This branch solves some memory and Spark related issues.\r\n  * Instead of using `flatMap` to cut blocks from all joints, we now do a `foldLeft` over the joints collection. This got rid of the extremely long RDD lineage chains that were causing a stack overflow.\r\n  * Removed three-tuples of doubles in favor of double arrays to avoid boxing and the associated high memory usage.\r\n  * Fixed up `equals` and `hashCode` for several of our classes because array equality is not as nice as tuple equality.\r\n  * Some minor changes here and there to address weird formatting or variable names.\r\n  * Updated unit tests for double arrays rather than tuples, but these should be checked over, especially the VTK stuff.","created_at":"2016-03-05T23:45:44Z","updated_at":"2016-03-07T23:26:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec359a00d24c69d8a85eb5a4a45f1b35e5624bab","assignee":{"login":"shellshocked2003","id":10856474,"avatar_url":"https://avatars.githubusercontent.com/u/10856474?v=3","gravatar_id":"","url":"https://api.github.com/users/shellshocked2003","html_url":"https://github.com/shellshocked2003","followers_url":"https://api.github.com/users/shellshocked2003/followers","following_url":"https://api.github.com/users/shellshocked2003/following{/other_user}","gists_url":"https://api.github.com/users/shellshocked2003/gists{/gist_id}","starred_url":"https://api.github.com/users/shellshocked2003/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shellshocked2003/subscriptions","organizations_url":"https://api.github.com/users/shellshocked2003/orgs","repos_url":"https://api.github.com/users/shellshocked2003/repos","events_url":"https://api.github.com/users/shellshocked2003/events{/privacy}","received_events_url":"https://api.github.com/users/shellshocked2003/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28/commits","review_comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28/comments","review_comment_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/28/comments","statuses_url":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/4ab07b93f991ac537eca96d321365d2bb1a05f73","head":{"label":"jKolb1:overflow","ref":"overflow","sha":"4ab07b93f991ac537eca96d321365d2bb1a05f73","user":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"repo":{"id":36398369,"name":"sparkRocks","full_name":"jKolb1/sparkRocks","owner":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jKolb1/sparkRocks","description":"Parallel rock slicing implementation on Apache Spark","fork":true,"url":"https://api.github.com/repos/jKolb1/sparkRocks","forks_url":"https://api.github.com/repos/jKolb1/sparkRocks/forks","keys_url":"https://api.github.com/repos/jKolb1/sparkRocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jKolb1/sparkRocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jKolb1/sparkRocks/teams","hooks_url":"https://api.github.com/repos/jKolb1/sparkRocks/hooks","issue_events_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/events{/number}","events_url":"https://api.github.com/repos/jKolb1/sparkRocks/events","assignees_url":"https://api.github.com/repos/jKolb1/sparkRocks/assignees{/user}","branches_url":"https://api.github.com/repos/jKolb1/sparkRocks/branches{/branch}","tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/tags","blobs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/{sha}","languages_url":"https://api.github.com/repos/jKolb1/sparkRocks/languages","stargazers_url":"https://api.github.com/repos/jKolb1/sparkRocks/stargazers","contributors_url":"https://api.github.com/repos/jKolb1/sparkRocks/contributors","subscribers_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscribers","subscription_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscription","commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/jKolb1/sparkRocks/contents/{+path}","compare_url":"https://api.github.com/repos/jKolb1/sparkRocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jKolb1/sparkRocks/merges","archive_url":"https://api.github.com/repos/jKolb1/sparkRocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jKolb1/sparkRocks/downloads","issues_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues{/number}","pulls_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls{/number}","milestones_url":"https://api.github.com/repos/jKolb1/sparkRocks/milestones{/number}","notifications_url":"https://api.github.com/repos/jKolb1/sparkRocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jKolb1/sparkRocks/labels{/name}","releases_url":"https://api.github.com/repos/jKolb1/sparkRocks/releases{/id}","deployments_url":"https://api.github.com/repos/jKolb1/sparkRocks/deployments","created_at":"2015-05-27T21:58:52Z","updated_at":"2016-01-27T07:19:27Z","pushed_at":"2016-03-05T23:45:44Z","git_url":"git://github.com/jKolb1/sparkRocks.git","ssh_url":"git@github.com:jKolb1/sparkRocks.git","clone_url":"https://github.com/jKolb1/sparkRocks.git","svn_url":"https://github.com/jKolb1/sparkRocks","homepage":"","size":500,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"jKolb1:master","ref":"master","sha":"3ca43dd2a83f8f910a39b4ef9f3f9dce690afb72","user":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"repo":{"id":36398369,"name":"sparkRocks","full_name":"jKolb1/sparkRocks","owner":{"login":"jKolb1","id":9288575,"avatar_url":"https://avatars.githubusercontent.com/u/9288575?v=3","gravatar_id":"","url":"https://api.github.com/users/jKolb1","html_url":"https://github.com/jKolb1","followers_url":"https://api.github.com/users/jKolb1/followers","following_url":"https://api.github.com/users/jKolb1/following{/other_user}","gists_url":"https://api.github.com/users/jKolb1/gists{/gist_id}","starred_url":"https://api.github.com/users/jKolb1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jKolb1/subscriptions","organizations_url":"https://api.github.com/users/jKolb1/orgs","repos_url":"https://api.github.com/users/jKolb1/repos","events_url":"https://api.github.com/users/jKolb1/events{/privacy}","received_events_url":"https://api.github.com/users/jKolb1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jKolb1/sparkRocks","description":"Parallel rock slicing implementation on Apache Spark","fork":true,"url":"https://api.github.com/repos/jKolb1/sparkRocks","forks_url":"https://api.github.com/repos/jKolb1/sparkRocks/forks","keys_url":"https://api.github.com/repos/jKolb1/sparkRocks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jKolb1/sparkRocks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jKolb1/sparkRocks/teams","hooks_url":"https://api.github.com/repos/jKolb1/sparkRocks/hooks","issue_events_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/events{/number}","events_url":"https://api.github.com/repos/jKolb1/sparkRocks/events","assignees_url":"https://api.github.com/repos/jKolb1/sparkRocks/assignees{/user}","branches_url":"https://api.github.com/repos/jKolb1/sparkRocks/branches{/branch}","tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/tags","blobs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/refs{/sha}","trees_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/{sha}","languages_url":"https://api.github.com/repos/jKolb1/sparkRocks/languages","stargazers_url":"https://api.github.com/repos/jKolb1/sparkRocks/stargazers","contributors_url":"https://api.github.com/repos/jKolb1/sparkRocks/contributors","subscribers_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscribers","subscription_url":"https://api.github.com/repos/jKolb1/sparkRocks/subscription","commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/commits{/sha}","git_commits_url":"https://api.github.com/repos/jKolb1/sparkRocks/git/commits{/sha}","comments_url":"https://api.github.com/repos/jKolb1/sparkRocks/comments{/number}","issue_comment_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues/comments{/number}","contents_url":"https://api.github.com/repos/jKolb1/sparkRocks/contents/{+path}","compare_url":"https://api.github.com/repos/jKolb1/sparkRocks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jKolb1/sparkRocks/merges","archive_url":"https://api.github.com/repos/jKolb1/sparkRocks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jKolb1/sparkRocks/downloads","issues_url":"https://api.github.com/repos/jKolb1/sparkRocks/issues{/number}","pulls_url":"https://api.github.com/repos/jKolb1/sparkRocks/pulls{/number}","milestones_url":"https://api.github.com/repos/jKolb1/sparkRocks/milestones{/number}","notifications_url":"https://api.github.com/repos/jKolb1/sparkRocks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jKolb1/sparkRocks/labels{/name}","releases_url":"https://api.github.com/repos/jKolb1/sparkRocks/releases{/id}","deployments_url":"https://api.github.com/repos/jKolb1/sparkRocks/deployments","created_at":"2015-05-27T21:58:52Z","updated_at":"2016-01-27T07:19:27Z","pushed_at":"2016-03-05T23:45:44Z","git_url":"git://github.com/jKolb1/sparkRocks.git","ssh_url":"git@github.com:jKolb1/sparkRocks.git","clone_url":"https://github.com/jKolb1/sparkRocks.git","svn_url":"https://github.com/jKolb1/sparkRocks","homepage":"","size":500,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28"},"html":{"href":"https://github.com/jKolb1/sparkRocks/pull/28"},"issue":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/issues/28"},"comments":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/jKolb1/sparkRocks/statuses/4ab07b93f991ac537eca96d321365d2bb1a05f73"}}}}