{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/algebird/pulls/comments/31554141","id":31554141,"diff_hunk":"@@ -0,0 +1,28 @@\n+package com.twitter.algebird.statistics\n+\n+import com.twitter.algebird.Monoid\n+\n+/**\n+ * @mean - Mean\n+ * @sigma - Standard deviation\n+ * aka Normal distribution\n+ */\n+case class GaussianDistribution(mean: Double, sigma: Double)\n+\n+object GaussianDistribution {\n+  implicit def monoid: Monoid[GaussianDistribution] = new GaussianDistributionMonoid\n+}\n+\n+/**\n+ * This monoid stems from the fact that if X and Y are independent random variables\n+ * that are normally distributed, then their sum is also\n+ * normally distributed, with its new mean equal to the sum of two means\n+ * and variance equal to the sum of two variances.\n+ */\n+class GaussianDistributionMonoid extends Monoid[GaussianDistribution] {\n+  override def zero = new GaussianDistribution(0, 0)\n+\n+  override def plus(left: GaussianDistribution, right: GaussianDistribution): GaussianDistribution = {","path":"algebird-core/src/main/scala/com/twitter/algebird/statistics/GaussianDistributionMonoid.scala","position":25,"original_position":25,"commit_id":"e02d29bd81b712ce1cae48a0fed34f3a24a7aefd","original_commit_id":"e02d29bd81b712ce1cae48a0fed34f3a24a7aefd","user":{"login":"johnynek","id":67958,"avatar_url":"https://avatars.githubusercontent.com/u/67958?v=3","gravatar_id":"","url":"https://api.github.com/users/johnynek","html_url":"https://github.com/johnynek","followers_url":"https://api.github.com/users/johnynek/followers","following_url":"https://api.github.com/users/johnynek/following{/other_user}","gists_url":"https://api.github.com/users/johnynek/gists{/gist_id}","starred_url":"https://api.github.com/users/johnynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnynek/subscriptions","organizations_url":"https://api.github.com/users/johnynek/orgs","repos_url":"https://api.github.com/users/johnynek/repos","events_url":"https://api.github.com/users/johnynek/events{/privacy}","received_events_url":"https://api.github.com/users/johnynek/received_events","type":"User","site_admin":false},"body":"no need for `{ }` please avoid when not needed.","created_at":"2015-06-02T18:24:10Z","updated_at":"2015-06-02T18:24:10Z","html_url":"https://github.com/twitter/algebird/pull/448#discussion_r31554141","pull_request_url":"https://api.github.com/repos/twitter/algebird/pulls/448","_links":{"self":{"href":"https://api.github.com/repos/twitter/algebird/pulls/comments/31554141"},"html":{"href":"https://github.com/twitter/algebird/pull/448#discussion_r31554141"},"pull_request":{"href":"https://api.github.com/repos/twitter/algebird/pulls/448"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/algebird/pulls/448","id":36694947,"html_url":"https://github.com/twitter/algebird/pull/448","diff_url":"https://github.com/twitter/algebird/pull/448.diff","patch_url":"https://github.com/twitter/algebird/pull/448.patch","issue_url":"https://api.github.com/repos/twitter/algebird/issues/448","number":448,"state":"open","locked":false,"title":"Pzheng/gaussian euclidean","user":{"login":"perryzheng","id":592011,"avatar_url":"https://avatars.githubusercontent.com/u/592011?v=3","gravatar_id":"","url":"https://api.github.com/users/perryzheng","html_url":"https://github.com/perryzheng","followers_url":"https://api.github.com/users/perryzheng/followers","following_url":"https://api.github.com/users/perryzheng/following{/other_user}","gists_url":"https://api.github.com/users/perryzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/perryzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perryzheng/subscriptions","organizations_url":"https://api.github.com/users/perryzheng/orgs","repos_url":"https://api.github.com/users/perryzheng/repos","events_url":"https://api.github.com/users/perryzheng/events{/privacy}","received_events_url":"https://api.github.com/users/perryzheng/received_events","type":"User","site_admin":false},"body":"Add gaussian distribution monoid","created_at":"2015-06-02T05:05:56Z","updated_at":"2015-06-02T18:24:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19bfad9d4afb9c2a525479bfb99a736f45c9d37b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twitter/algebird/pulls/448/commits","review_comments_url":"https://api.github.com/repos/twitter/algebird/pulls/448/comments","review_comment_url":"https://api.github.com/repos/twitter/algebird/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/algebird/issues/448/comments","statuses_url":"https://api.github.com/repos/twitter/algebird/statuses/e02d29bd81b712ce1cae48a0fed34f3a24a7aefd","head":{"label":"perryzheng:pzheng/gaussian_euclidean","ref":"pzheng/gaussian_euclidean","sha":"e02d29bd81b712ce1cae48a0fed34f3a24a7aefd","user":{"login":"perryzheng","id":592011,"avatar_url":"https://avatars.githubusercontent.com/u/592011?v=3","gravatar_id":"","url":"https://api.github.com/users/perryzheng","html_url":"https://github.com/perryzheng","followers_url":"https://api.github.com/users/perryzheng/followers","following_url":"https://api.github.com/users/perryzheng/following{/other_user}","gists_url":"https://api.github.com/users/perryzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/perryzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perryzheng/subscriptions","organizations_url":"https://api.github.com/users/perryzheng/orgs","repos_url":"https://api.github.com/users/perryzheng/repos","events_url":"https://api.github.com/users/perryzheng/events{/privacy}","received_events_url":"https://api.github.com/users/perryzheng/received_events","type":"User","site_admin":false},"repo":{"id":36705076,"name":"algebird","full_name":"perryzheng/algebird","owner":{"login":"perryzheng","id":592011,"avatar_url":"https://avatars.githubusercontent.com/u/592011?v=3","gravatar_id":"","url":"https://api.github.com/users/perryzheng","html_url":"https://github.com/perryzheng","followers_url":"https://api.github.com/users/perryzheng/followers","following_url":"https://api.github.com/users/perryzheng/following{/other_user}","gists_url":"https://api.github.com/users/perryzheng/gists{/gist_id}","starred_url":"https://api.github.com/users/perryzheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/perryzheng/subscriptions","organizations_url":"https://api.github.com/users/perryzheng/orgs","repos_url":"https://api.github.com/users/perryzheng/repos","events_url":"https://api.github.com/users/perryzheng/events{/privacy}","received_events_url":"https://api.github.com/users/perryzheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/perryzheng/algebird","description":"Abstract Algebra for Scala","fork":true,"url":"https://api.github.com/repos/perryzheng/algebird","forks_url":"https://api.github.com/repos/perryzheng/algebird/forks","keys_url":"https://api.github.com/repos/perryzheng/algebird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/perryzheng/algebird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/perryzheng/algebird/teams","hooks_url":"https://api.github.com/repos/perryzheng/algebird/hooks","issue_events_url":"https://api.github.com/repos/perryzheng/algebird/issues/events{/number}","events_url":"https://api.github.com/repos/perryzheng/algebird/events","assignees_url":"https://api.github.com/repos/perryzheng/algebird/assignees{/user}","branches_url":"https://api.github.com/repos/perryzheng/algebird/branches{/branch}","tags_url":"https://api.github.com/repos/perryzheng/algebird/tags","blobs_url":"https://api.github.com/repos/perryzheng/algebird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/perryzheng/algebird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/perryzheng/algebird/git/refs{/sha}","trees_url":"https://api.github.com/repos/perryzheng/algebird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/perryzheng/algebird/statuses/{sha}","languages_url":"https://api.github.com/repos/perryzheng/algebird/languages","stargazers_url":"https://api.github.com/repos/perryzheng/algebird/stargazers","contributors_url":"https://api.github.com/repos/perryzheng/algebird/contributors","subscribers_url":"https://api.github.com/repos/perryzheng/algebird/subscribers","subscription_url":"https://api.github.com/repos/perryzheng/algebird/subscription","commits_url":"https://api.github.com/repos/perryzheng/algebird/commits{/sha}","git_commits_url":"https://api.github.com/repos/perryzheng/algebird/git/commits{/sha}","comments_url":"https://api.github.com/repos/perryzheng/algebird/comments{/number}","issue_comment_url":"https://api.github.com/repos/perryzheng/algebird/issues/comments{/number}","contents_url":"https://api.github.com/repos/perryzheng/algebird/contents/{+path}","compare_url":"https://api.github.com/repos/perryzheng/algebird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/perryzheng/algebird/merges","archive_url":"https://api.github.com/repos/perryzheng/algebird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/perryzheng/algebird/downloads","issues_url":"https://api.github.com/repos/perryzheng/algebird/issues{/number}","pulls_url":"https://api.github.com/repos/perryzheng/algebird/pulls{/number}","milestones_url":"https://api.github.com/repos/perryzheng/algebird/milestones{/number}","notifications_url":"https://api.github.com/repos/perryzheng/algebird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/perryzheng/algebird/labels{/name}","releases_url":"https://api.github.com/repos/perryzheng/algebird/releases{/id}","created_at":"2015-06-02T03:22:01Z","updated_at":"2015-06-02T03:22:05Z","pushed_at":"2015-06-02T05:03:27Z","git_url":"git://github.com/perryzheng/algebird.git","ssh_url":"git@github.com:perryzheng/algebird.git","clone_url":"https://github.com/perryzheng/algebird.git","svn_url":"https://github.com/perryzheng/algebird","homepage":"https://twitter.com/scalding","size":8601,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"twitter:develop","ref":"develop","sha":"8e4270b440c9dc0361f07f216f9cf5f064b32f86","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":5275507,"name":"algebird","full_name":"twitter/algebird","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/algebird","description":"Abstract Algebra for Scala","fork":false,"url":"https://api.github.com/repos/twitter/algebird","forks_url":"https://api.github.com/repos/twitter/algebird/forks","keys_url":"https://api.github.com/repos/twitter/algebird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/algebird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/algebird/teams","hooks_url":"https://api.github.com/repos/twitter/algebird/hooks","issue_events_url":"https://api.github.com/repos/twitter/algebird/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/algebird/events","assignees_url":"https://api.github.com/repos/twitter/algebird/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/algebird/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/algebird/tags","blobs_url":"https://api.github.com/repos/twitter/algebird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/algebird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/algebird/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/algebird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/algebird/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/algebird/languages","stargazers_url":"https://api.github.com/repos/twitter/algebird/stargazers","contributors_url":"https://api.github.com/repos/twitter/algebird/contributors","subscribers_url":"https://api.github.com/repos/twitter/algebird/subscribers","subscription_url":"https://api.github.com/repos/twitter/algebird/subscription","commits_url":"https://api.github.com/repos/twitter/algebird/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/algebird/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/algebird/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/algebird/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/algebird/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/algebird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/algebird/merges","archive_url":"https://api.github.com/repos/twitter/algebird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/algebird/downloads","issues_url":"https://api.github.com/repos/twitter/algebird/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/algebird/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/algebird/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/algebird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/algebird/labels{/name}","releases_url":"https://api.github.com/repos/twitter/algebird/releases{/id}","created_at":"2012-08-02T17:24:42Z","updated_at":"2015-06-02T09:27:45Z","pushed_at":"2015-06-02T05:05:57Z","git_url":"git://github.com/twitter/algebird.git","ssh_url":"git@github.com:twitter/algebird.git","clone_url":"https://github.com/twitter/algebird.git","svn_url":"https://github.com/twitter/algebird","homepage":"https://twitter.com/scalding","size":8601,"stargazers_count":908,"watchers_count":908,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":168,"mirror_url":null,"open_issues_count":86,"forks":168,"open_issues":86,"watchers":908,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/algebird/pulls/448"},"html":{"href":"https://github.com/twitter/algebird/pull/448"},"issue":{"href":"https://api.github.com/repos/twitter/algebird/issues/448"},"comments":{"href":"https://api.github.com/repos/twitter/algebird/issues/448/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/algebird/pulls/448/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/algebird/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/algebird/pulls/448/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/algebird/statuses/e02d29bd81b712ce1cae48a0fed34f3a24a7aefd"}}}}