{"action":"created","comment":{"url":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/comments/114308724","pull_request_review_id":35762640,"id":114308724,"diff_hunk":"@@ -0,0 +1,150 @@\n+/*\n+ * Copyright (c) 2008-2017, Hazelcast, Inc. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.hazelcast.jet.accumulator;\n+\n+import com.hazelcast.jet.JetException;\n+import com.hazelcast.nio.ObjectDataOutput;\n+\n+import java.io.IOException;\n+import java.math.BigInteger;\n+\n+/**\n+ * Maintains the components needed to compute the linear regression on a\n+ * set of {@code (long, long)} pairs. The intermediate results are held in\n+ * the form of {@link BigInteger} and the finished value is a {@code\n+ * double}-valued linear coefficient.\n+ */\n+public final class LinRegAccumulator {","path":"hazelcast-jet-core/src/main/java/com/hazelcast/jet/accumulator/LinRegAccumulator.java","position":31,"original_position":31,"commit_id":"f300f3db5ddbabe180520378512353e08952944e","original_commit_id":"f300f3db5ddbabe180520378512353e08952944e","user":{"login":"viliam-durina","id":9109877,"avatar_url":"https://avatars3.githubusercontent.com/u/9109877?v=3","gravatar_id":"","url":"https://api.github.com/users/viliam-durina","html_url":"https://github.com/viliam-durina","followers_url":"https://api.github.com/users/viliam-durina/followers","following_url":"https://api.github.com/users/viliam-durina/following{/other_user}","gists_url":"https://api.github.com/users/viliam-durina/gists{/gist_id}","starred_url":"https://api.github.com/users/viliam-durina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/viliam-durina/subscriptions","organizations_url":"https://api.github.com/users/viliam-durina/orgs","repos_url":"https://api.github.com/users/viliam-durina/repos","events_url":"https://api.github.com/users/viliam-durina/events{/privacy}","received_events_url":"https://api.github.com/users/viliam-durina/received_events","type":"User","site_admin":false},"body":"There are two components to linear regression: slope and y-position: `y = ax + b`, `a` being the slope. We should call this `LinearRegressionSlope` or calculate both.\r\n","created_at":"2017-05-02T12:43:27Z","updated_at":"2017-05-02T12:56:37Z","html_url":"https://github.com/hazelcast/hazelcast-jet/pull/412#discussion_r114308724","pull_request_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412","_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/comments/114308724"},"html":{"href":"https://github.com/hazelcast/hazelcast-jet/pull/412#discussion_r114308724"},"pull_request":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412"}}},"pull_request":{"url":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412","id":118314364,"html_url":"https://github.com/hazelcast/hazelcast-jet/pull/412","diff_url":"https://github.com/hazelcast/hazelcast-jet/pull/412.diff","patch_url":"https://github.com/hazelcast/hazelcast-jet/pull/412.patch","issue_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/issues/412","number":412,"state":"open","locked":false,"title":"Linear regression window operation","user":{"login":"mtopolnik","id":490953,"avatar_url":"https://avatars1.githubusercontent.com/u/490953?v=3","gravatar_id":"","url":"https://api.github.com/users/mtopolnik","html_url":"https://github.com/mtopolnik","followers_url":"https://api.github.com/users/mtopolnik/followers","following_url":"https://api.github.com/users/mtopolnik/following{/other_user}","gists_url":"https://api.github.com/users/mtopolnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mtopolnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtopolnik/subscriptions","organizations_url":"https://api.github.com/users/mtopolnik/orgs","repos_url":"https://api.github.com/users/mtopolnik/repos","events_url":"https://api.github.com/users/mtopolnik/events{/privacy}","received_events_url":"https://api.github.com/users/mtopolnik/received_events","type":"User","site_admin":false},"body":"Also improve mutable `Accumulators`.","created_at":"2017-04-30T14:44:54Z","updated_at":"2017-05-02T12:56:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"323cae785435c209b5d82403bd915547ec37903e","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/hazelcast/hazelcast-jet/milestones/6","html_url":"https://github.com/hazelcast/hazelcast-jet/milestone/6","labels_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/milestones/6/labels","id":2402729,"number":6,"title":"0.4","description":"","creator":{"login":"cangencer","id":510278,"avatar_url":"https://avatars3.githubusercontent.com/u/510278?v=3","gravatar_id":"","url":"https://api.github.com/users/cangencer","html_url":"https://github.com/cangencer","followers_url":"https://api.github.com/users/cangencer/followers","following_url":"https://api.github.com/users/cangencer/following{/other_user}","gists_url":"https://api.github.com/users/cangencer/gists{/gist_id}","starred_url":"https://api.github.com/users/cangencer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cangencer/subscriptions","organizations_url":"https://api.github.com/users/cangencer/orgs","repos_url":"https://api.github.com/users/cangencer/repos","events_url":"https://api.github.com/users/cangencer/events{/privacy}","received_events_url":"https://api.github.com/users/cangencer/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":52,"state":"open","created_at":"2017-03-22T07:07:59Z","updated_at":"2017-05-01T10:18:19Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412/commits","review_comments_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412/comments","review_comment_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/issues/412/comments","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/statuses/f300f3db5ddbabe180520378512353e08952944e","head":{"label":"mtopolnik:lin-reg","ref":"lin-reg","sha":"f300f3db5ddbabe180520378512353e08952944e","user":{"login":"mtopolnik","id":490953,"avatar_url":"https://avatars1.githubusercontent.com/u/490953?v=3","gravatar_id":"","url":"https://api.github.com/users/mtopolnik","html_url":"https://github.com/mtopolnik","followers_url":"https://api.github.com/users/mtopolnik/followers","following_url":"https://api.github.com/users/mtopolnik/following{/other_user}","gists_url":"https://api.github.com/users/mtopolnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mtopolnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtopolnik/subscriptions","organizations_url":"https://api.github.com/users/mtopolnik/orgs","repos_url":"https://api.github.com/users/mtopolnik/repos","events_url":"https://api.github.com/users/mtopolnik/events{/privacy}","received_events_url":"https://api.github.com/users/mtopolnik/received_events","type":"User","site_admin":false},"repo":{"id":81251489,"name":"hazelcast-jet","full_name":"mtopolnik/hazelcast-jet","owner":{"login":"mtopolnik","id":490953,"avatar_url":"https://avatars1.githubusercontent.com/u/490953?v=3","gravatar_id":"","url":"https://api.github.com/users/mtopolnik","html_url":"https://github.com/mtopolnik","followers_url":"https://api.github.com/users/mtopolnik/followers","following_url":"https://api.github.com/users/mtopolnik/following{/other_user}","gists_url":"https://api.github.com/users/mtopolnik/gists{/gist_id}","starred_url":"https://api.github.com/users/mtopolnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtopolnik/subscriptions","organizations_url":"https://api.github.com/users/mtopolnik/orgs","repos_url":"https://api.github.com/users/mtopolnik/repos","events_url":"https://api.github.com/users/mtopolnik/events{/privacy}","received_events_url":"https://api.github.com/users/mtopolnik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtopolnik/hazelcast-jet","description":"A general purpose distributed data processing engine, built on top of Hazelcast.","fork":true,"url":"https://api.github.com/repos/mtopolnik/hazelcast-jet","forks_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/forks","keys_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/teams","hooks_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/hooks","issue_events_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/issues/events{/number}","events_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/events","assignees_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/assignees{/user}","branches_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/branches{/branch}","tags_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/tags","blobs_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/statuses/{sha}","languages_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/languages","stargazers_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/stargazers","contributors_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/contributors","subscribers_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/subscribers","subscription_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/subscription","commits_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/contents/{+path}","compare_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/merges","archive_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/downloads","issues_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/issues{/number}","pulls_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/pulls{/number}","milestones_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/milestones{/number}","notifications_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/labels{/name}","releases_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/releases{/id}","deployments_url":"https://api.github.com/repos/mtopolnik/hazelcast-jet/deployments","created_at":"2017-02-07T20:35:36Z","updated_at":"2017-02-07T20:35:42Z","pushed_at":"2017-05-01T12:40:22Z","git_url":"git://github.com/mtopolnik/hazelcast-jet.git","ssh_url":"git@github.com:mtopolnik/hazelcast-jet.git","clone_url":"https://github.com/mtopolnik/hazelcast-jet.git","svn_url":"https://github.com/mtopolnik/hazelcast-jet","homepage":"http://jet.hazelcast.org","size":5634,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"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":"hazelcast:master","ref":"master","sha":"75ab4fb48fa013313285e16af99d2b9eb962cd96","user":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars1.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"repo":{"id":48046454,"name":"hazelcast-jet","full_name":"hazelcast/hazelcast-jet","owner":{"login":"hazelcast","id":1453152,"avatar_url":"https://avatars1.githubusercontent.com/u/1453152?v=3","gravatar_id":"","url":"https://api.github.com/users/hazelcast","html_url":"https://github.com/hazelcast","followers_url":"https://api.github.com/users/hazelcast/followers","following_url":"https://api.github.com/users/hazelcast/following{/other_user}","gists_url":"https://api.github.com/users/hazelcast/gists{/gist_id}","starred_url":"https://api.github.com/users/hazelcast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazelcast/subscriptions","organizations_url":"https://api.github.com/users/hazelcast/orgs","repos_url":"https://api.github.com/users/hazelcast/repos","events_url":"https://api.github.com/users/hazelcast/events{/privacy}","received_events_url":"https://api.github.com/users/hazelcast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hazelcast/hazelcast-jet","description":"A general purpose distributed data processing engine, built on top of Hazelcast.","fork":false,"url":"https://api.github.com/repos/hazelcast/hazelcast-jet","forks_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/forks","keys_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/teams","hooks_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/hooks","issue_events_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/issues/events{/number}","events_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/events","assignees_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/assignees{/user}","branches_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/branches{/branch}","tags_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/tags","blobs_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/git/refs{/sha}","trees_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/statuses/{sha}","languages_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/languages","stargazers_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/stargazers","contributors_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/contributors","subscribers_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/subscribers","subscription_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/subscription","commits_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/commits{/sha}","git_commits_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/git/commits{/sha}","comments_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/comments{/number}","issue_comment_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/issues/comments{/number}","contents_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/contents/{+path}","compare_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/merges","archive_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/downloads","issues_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/issues{/number}","pulls_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls{/number}","milestones_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/milestones{/number}","notifications_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/labels{/name}","releases_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/releases{/id}","deployments_url":"https://api.github.com/repos/hazelcast/hazelcast-jet/deployments","created_at":"2015-12-15T14:01:14Z","updated_at":"2017-04-20T14:38:40Z","pushed_at":"2017-05-02T11:31:52Z","git_url":"git://github.com/hazelcast/hazelcast-jet.git","ssh_url":"git@github.com:hazelcast/hazelcast-jet.git","clone_url":"https://github.com/hazelcast/hazelcast-jet.git","svn_url":"https://github.com/hazelcast/hazelcast-jet","homepage":"http://jet.hazelcast.org","size":5555,"stargazers_count":119,"watchers_count":119,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"open_issues_count":6,"forks":37,"open_issues":6,"watchers":119,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412"},"html":{"href":"https://github.com/hazelcast/hazelcast-jet/pull/412"},"issue":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/issues/412"},"comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/issues/412/comments"},"review_comments":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412/comments"},"review_comment":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/pulls/412/commits"},"statuses":{"href":"https://api.github.com/repos/hazelcast/hazelcast-jet/statuses/f300f3db5ddbabe180520378512353e08952944e"}}}}
{"actor":{"display_login":"viliam-durina"}}