{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/43455187","id":43455187,"diff_hunk":"@@ -712,6 +722,9 @@ class SparseVector @Since(\"1.0.0\") (\n     }\n   }\n \n+  @Since(\"1.6.0\")\n+  private[spark] def foreach(f: (Double) => Unit) = { indices.foreach { i: Int => f(values(i)) } }","path":"mllib/src/main/scala/org/apache/spark/mllib/linalg/Vectors.scala","position":29,"original_position":29,"commit_id":"412b77e4a9288396030ecbe795fd04c0f646640f","original_commit_id":"412b77e4a9288396030ecbe795fd04c0f646640f","user":{"login":"srowen","id":822522,"avatar_url":"https://avatars.githubusercontent.com/u/822522?v=3","gravatar_id":"","url":"https://api.github.com/users/srowen","html_url":"https://github.com/srowen","followers_url":"https://api.github.com/users/srowen/followers","following_url":"https://api.github.com/users/srowen/following{/other_user}","gists_url":"https://api.github.com/users/srowen/gists{/gist_id}","starred_url":"https://api.github.com/users/srowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srowen/subscriptions","organizations_url":"https://api.github.com/users/srowen/orgs","repos_url":"https://api.github.com/users/srowen/repos","events_url":"https://api.github.com/users/srowen/events{/privacy}","received_events_url":"https://api.github.com/users/srowen/received_events","type":"User","site_admin":false},"body":"Yeah, it's `foreachValue`, but you can already operate on all 'active' values with `foreachActive`. Does this add much/","created_at":"2015-10-29T22:58:01Z","updated_at":"2015-10-29T22:58:01Z","html_url":"https://github.com/apache/spark/pull/9362#discussion_r43455187","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/9362","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/43455187"},"html":{"href":"https://github.com/apache/spark/pull/9362#discussion_r43455187"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/9362"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/9362","id":49200484,"html_url":"https://github.com/apache/spark/pull/9362","diff_url":"https://github.com/apache/spark/pull/9362.diff","patch_url":"https://github.com/apache/spark/pull/9362.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/9362","number":9362,"state":"open","locked":false,"title":"[SPARK-11385][ML][WIP] foreach added to mllib.linalg.Vector.","user":{"login":"nakul02","id":5394361,"avatar_url":"https://avatars.githubusercontent.com/u/5394361?v=3","gravatar_id":"","url":"https://api.github.com/users/nakul02","html_url":"https://github.com/nakul02","followers_url":"https://api.github.com/users/nakul02/followers","following_url":"https://api.github.com/users/nakul02/following{/other_user}","gists_url":"https://api.github.com/users/nakul02/gists{/gist_id}","starred_url":"https://api.github.com/users/nakul02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nakul02/subscriptions","organizations_url":"https://api.github.com/users/nakul02/orgs","repos_url":"https://api.github.com/users/nakul02/repos","events_url":"https://api.github.com/users/nakul02/events{/privacy}","received_events_url":"https://api.github.com/users/nakul02/received_events","type":"User","site_admin":false},"body":" foreach API added to MLLib's vector.\r\n","created_at":"2015-10-29T21:10:51Z","updated_at":"2015-10-29T22:58:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e67a8a9761de218fe3a68c27356a09283238e15","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/9362/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/9362/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/9362/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/412b77e4a9288396030ecbe795fd04c0f646640f","head":{"label":"nakul02:SPARK-11385_foreach_for_mllib_linalg_vector","ref":"SPARK-11385_foreach_for_mllib_linalg_vector","sha":"412b77e4a9288396030ecbe795fd04c0f646640f","user":{"login":"nakul02","id":5394361,"avatar_url":"https://avatars.githubusercontent.com/u/5394361?v=3","gravatar_id":"","url":"https://api.github.com/users/nakul02","html_url":"https://github.com/nakul02","followers_url":"https://api.github.com/users/nakul02/followers","following_url":"https://api.github.com/users/nakul02/following{/other_user}","gists_url":"https://api.github.com/users/nakul02/gists{/gist_id}","starred_url":"https://api.github.com/users/nakul02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nakul02/subscriptions","organizations_url":"https://api.github.com/users/nakul02/orgs","repos_url":"https://api.github.com/users/nakul02/repos","events_url":"https://api.github.com/users/nakul02/events{/privacy}","received_events_url":"https://api.github.com/users/nakul02/received_events","type":"User","site_admin":false},"repo":{"id":45090315,"name":"spark","full_name":"nakul02/spark","owner":{"login":"nakul02","id":5394361,"avatar_url":"https://avatars.githubusercontent.com/u/5394361?v=3","gravatar_id":"","url":"https://api.github.com/users/nakul02","html_url":"https://github.com/nakul02","followers_url":"https://api.github.com/users/nakul02/followers","following_url":"https://api.github.com/users/nakul02/following{/other_user}","gists_url":"https://api.github.com/users/nakul02/gists{/gist_id}","starred_url":"https://api.github.com/users/nakul02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nakul02/subscriptions","organizations_url":"https://api.github.com/users/nakul02/orgs","repos_url":"https://api.github.com/users/nakul02/repos","events_url":"https://api.github.com/users/nakul02/events{/privacy}","received_events_url":"https://api.github.com/users/nakul02/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nakul02/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/nakul02/spark","forks_url":"https://api.github.com/repos/nakul02/spark/forks","keys_url":"https://api.github.com/repos/nakul02/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nakul02/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nakul02/spark/teams","hooks_url":"https://api.github.com/repos/nakul02/spark/hooks","issue_events_url":"https://api.github.com/repos/nakul02/spark/issues/events{/number}","events_url":"https://api.github.com/repos/nakul02/spark/events","assignees_url":"https://api.github.com/repos/nakul02/spark/assignees{/user}","branches_url":"https://api.github.com/repos/nakul02/spark/branches{/branch}","tags_url":"https://api.github.com/repos/nakul02/spark/tags","blobs_url":"https://api.github.com/repos/nakul02/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nakul02/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nakul02/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/nakul02/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nakul02/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/nakul02/spark/languages","stargazers_url":"https://api.github.com/repos/nakul02/spark/stargazers","contributors_url":"https://api.github.com/repos/nakul02/spark/contributors","subscribers_url":"https://api.github.com/repos/nakul02/spark/subscribers","subscription_url":"https://api.github.com/repos/nakul02/spark/subscription","commits_url":"https://api.github.com/repos/nakul02/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/nakul02/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/nakul02/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/nakul02/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/nakul02/spark/contents/{+path}","compare_url":"https://api.github.com/repos/nakul02/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nakul02/spark/merges","archive_url":"https://api.github.com/repos/nakul02/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nakul02/spark/downloads","issues_url":"https://api.github.com/repos/nakul02/spark/issues{/number}","pulls_url":"https://api.github.com/repos/nakul02/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/nakul02/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/nakul02/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nakul02/spark/labels{/name}","releases_url":"https://api.github.com/repos/nakul02/spark/releases{/id}","created_at":"2015-10-28T05:11:10Z","updated_at":"2015-10-28T05:11:41Z","pushed_at":"2015-10-29T21:09:30Z","git_url":"git://github.com/nakul02/spark.git","ssh_url":"git@github.com:nakul02/spark.git","clone_url":"https://github.com/nakul02/spark.git","svn_url":"https://github.com/nakul02/spark","homepage":null,"size":129453,"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":"apache:master","ref":"master","sha":"f21ef8dbb2ef6526b8b47e18b9d8d91dd520c086","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-10-29T22:27:31Z","pushed_at":"2015-10-29T22:27:52Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1650993,"stargazers_count":5944,"watchers_count":5944,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5534,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":366,"forks":5534,"open_issues":366,"watchers":5944,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/9362"},"html":{"href":"https://github.com/apache/spark/pull/9362"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/9362"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/9362/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/9362/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/9362/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/412b77e4a9288396030ecbe795fd04c0f646640f"}}}}