{"action":"created","comment":{"url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/comments/44861262","id":44861262,"diff_hunk":"@@ -0,0 +1,115 @@\n+package matrix;\n+\n+public class Matrix {\n+\n+    private int row;\n+    private int column;\n+    private int[][] matrix;\n+\n+    public Matrix(int column, int row) {\n+        this.column = column;\n+        this.row = row;\n+        this.matrix = new int[row][column];\n+    }\n+\n+    public Matrix(int[][] matrix) {\n+        if (matrix == null || matrix.length == 0) {\n+            this.matrix = new int[][]{};\n+        } else {\n+            row = matrix.length;\n+            column = matrix[0].length;\n+            this.matrix = new int[row][column];\n+            for (int i = 0; i < row; i++) {\n+                for (int j = 0; j < column; j++) {\n+                    this.matrix[i][j] = matrix[i][j];\n+                }\n+            }\n+        }\n+    }\n+\n+    public int getElement(int row, int column) {\n+        try {\n+            return matrix[row][column];\n+        } catch (Exception e) {\n+            throw new RuntimeException(\"Illegal matrix dimensions.\");\n+        }\n+    }\n+\n+    public void setElement(int row, int column, int element) {\n+        try {\n+            matrix[row][column] = element;\n+        } catch (Exception e) {\n+            throw new RuntimeException(\"Illegal matrix dimensions.\");\n+        }\n+    }\n+\n+    public Matrix addition(Matrix other) {\n+        if (other.row != this.row || other.column != this.column) {\n+            throw new RuntimeException(\"Illegal matrix dimensions.\");\n+        }\n+        Matrix result = new Matrix(row, column);\n+        for (int i = 0; i < row; i++)\n+            for (int j = 0; j < column; j++)\n+                result.matrix[i][j] = this.matrix[i][j] + other.matrix[i][j];\n+        return result;\n+    }\n+\n+    public Matrix multiply(Matrix other) {\n+        if (this.column != other.row || this.row != other.column) {\n+            throw new RuntimeException(\"Illegal matrix dimensions.\");\n+        }\n+        Matrix result = new Matrix(this.row, other.column);\n+        for (int i = 0; i < result.row; i++)\n+            for (int j = 0; j < result.column; j++)\n+                for (int k = 0; k < this.column; k++)\n+                    result.matrix[i][j] += this.matrix[i][k] * other.matrix[k][j];\n+        return result;\n+    }\n+\n+    public int getDeterminant() {\n+        if (this.row != this.column || this.row == 1 || this.row == 0) {\n+            throw new RuntimeException(\"Illegal matrix dimensions.\");\n+        }\n+        if (this.row == 2) {\n+            return this.getElement(0, 0) * this.getElement(1, 1) - this.getElement(1, 0) * this.getElement(0, 1);\n+        }\n+        int result = 0;\n+        int coefficient;","path":"src/matrix/Matrix.java","position":77,"original_position":77,"commit_id":"32796823a6e4a0ed8408043fda17ec8f50884c12","original_commit_id":"32796823a6e4a0ed8408043fda17ec8f50884c12","user":{"login":"AlexanderShushunov","id":5528356,"avatar_url":"https://avatars.githubusercontent.com/u/5528356?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderShushunov","html_url":"https://github.com/AlexanderShushunov","followers_url":"https://api.github.com/users/AlexanderShushunov/followers","following_url":"https://api.github.com/users/AlexanderShushunov/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderShushunov/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderShushunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderShushunov/subscriptions","organizations_url":"https://api.github.com/users/AlexanderShushunov/orgs","repos_url":"https://api.github.com/users/AlexanderShushunov/repos","events_url":"https://api.github.com/users/AlexanderShushunov/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderShushunov/received_events","type":"User","site_admin":false},"body":"Далеко от использования","created_at":"2015-11-14T17:27:43Z","updated_at":"2015-11-14T17:27:43Z","html_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix/pull/1#discussion_r44861262","pull_request_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/comments/44861262"},"html":{"href":"https://github.com/bot-rogerthat/IntUtil_and_Matrix/pull/1#discussion_r44861262"},"pull_request":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1","id":50145358,"html_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix/pull/1","diff_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix/pull/1.diff","patch_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix/pull/1.patch","issue_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/1","number":1,"state":"open","locked":false,"title":"add intUtil and matrix","user":{"login":"bot-rogerthat","id":14311147,"avatar_url":"https://avatars.githubusercontent.com/u/14311147?v=3","gravatar_id":"","url":"https://api.github.com/users/bot-rogerthat","html_url":"https://github.com/bot-rogerthat","followers_url":"https://api.github.com/users/bot-rogerthat/followers","following_url":"https://api.github.com/users/bot-rogerthat/following{/other_user}","gists_url":"https://api.github.com/users/bot-rogerthat/gists{/gist_id}","starred_url":"https://api.github.com/users/bot-rogerthat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bot-rogerthat/subscriptions","organizations_url":"https://api.github.com/users/bot-rogerthat/orgs","repos_url":"https://api.github.com/users/bot-rogerthat/repos","events_url":"https://api.github.com/users/bot-rogerthat/events{/privacy}","received_events_url":"https://api.github.com/users/bot-rogerthat/received_events","type":"User","site_admin":false},"body":"add intUtil and matrix","created_at":"2015-11-09T16:40:12Z","updated_at":"2015-11-14T17:27:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65e1e752586c91de6d55f6f2b325fba6cc4b55ea","assignee":{"login":"AlexanderShushunov","id":5528356,"avatar_url":"https://avatars.githubusercontent.com/u/5528356?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexanderShushunov","html_url":"https://github.com/AlexanderShushunov","followers_url":"https://api.github.com/users/AlexanderShushunov/followers","following_url":"https://api.github.com/users/AlexanderShushunov/following{/other_user}","gists_url":"https://api.github.com/users/AlexanderShushunov/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexanderShushunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexanderShushunov/subscriptions","organizations_url":"https://api.github.com/users/AlexanderShushunov/orgs","repos_url":"https://api.github.com/users/AlexanderShushunov/repos","events_url":"https://api.github.com/users/AlexanderShushunov/events{/privacy}","received_events_url":"https://api.github.com/users/AlexanderShushunov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1/commits","review_comments_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1/comments","review_comment_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/1/comments","statuses_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/statuses/32796823a6e4a0ed8408043fda17ec8f50884c12","head":{"label":"bot-rogerthat:task","ref":"task","sha":"32796823a6e4a0ed8408043fda17ec8f50884c12","user":{"login":"bot-rogerthat","id":14311147,"avatar_url":"https://avatars.githubusercontent.com/u/14311147?v=3","gravatar_id":"","url":"https://api.github.com/users/bot-rogerthat","html_url":"https://github.com/bot-rogerthat","followers_url":"https://api.github.com/users/bot-rogerthat/followers","following_url":"https://api.github.com/users/bot-rogerthat/following{/other_user}","gists_url":"https://api.github.com/users/bot-rogerthat/gists{/gist_id}","starred_url":"https://api.github.com/users/bot-rogerthat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bot-rogerthat/subscriptions","organizations_url":"https://api.github.com/users/bot-rogerthat/orgs","repos_url":"https://api.github.com/users/bot-rogerthat/repos","events_url":"https://api.github.com/users/bot-rogerthat/events{/privacy}","received_events_url":"https://api.github.com/users/bot-rogerthat/received_events","type":"User","site_admin":false},"repo":{"id":45851173,"name":"IntUtil_and_Matrix","full_name":"bot-rogerthat/IntUtil_and_Matrix","owner":{"login":"bot-rogerthat","id":14311147,"avatar_url":"https://avatars.githubusercontent.com/u/14311147?v=3","gravatar_id":"","url":"https://api.github.com/users/bot-rogerthat","html_url":"https://github.com/bot-rogerthat","followers_url":"https://api.github.com/users/bot-rogerthat/followers","following_url":"https://api.github.com/users/bot-rogerthat/following{/other_user}","gists_url":"https://api.github.com/users/bot-rogerthat/gists{/gist_id}","starred_url":"https://api.github.com/users/bot-rogerthat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bot-rogerthat/subscriptions","organizations_url":"https://api.github.com/users/bot-rogerthat/orgs","repos_url":"https://api.github.com/users/bot-rogerthat/repos","events_url":"https://api.github.com/users/bot-rogerthat/events{/privacy}","received_events_url":"https://api.github.com/users/bot-rogerthat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix","description":"","fork":false,"url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix","forks_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/forks","keys_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/teams","hooks_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/hooks","issue_events_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/events{/number}","events_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/events","assignees_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/assignees{/user}","branches_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/branches{/branch}","tags_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/tags","blobs_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/refs{/sha}","trees_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/statuses/{sha}","languages_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/languages","stargazers_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/stargazers","contributors_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/contributors","subscribers_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/subscribers","subscription_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/subscription","commits_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/commits{/sha}","git_commits_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/commits{/sha}","comments_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/comments{/number}","issue_comment_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/comments{/number}","contents_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/contents/{+path}","compare_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/merges","archive_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/downloads","issues_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues{/number}","pulls_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls{/number}","milestones_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/milestones{/number}","notifications_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/labels{/name}","releases_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/releases{/id}","created_at":"2015-11-09T16:33:27Z","updated_at":"2015-11-09T16:33:27Z","pushed_at":"2015-11-09T16:40:13Z","git_url":"git://github.com/bot-rogerthat/IntUtil_and_Matrix.git","ssh_url":"git@github.com:bot-rogerthat/IntUtil_and_Matrix.git","clone_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix.git","svn_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"bot-rogerthat:master","ref":"master","sha":"61151ab6c986916c4a607fa68f03802e3946c59e","user":{"login":"bot-rogerthat","id":14311147,"avatar_url":"https://avatars.githubusercontent.com/u/14311147?v=3","gravatar_id":"","url":"https://api.github.com/users/bot-rogerthat","html_url":"https://github.com/bot-rogerthat","followers_url":"https://api.github.com/users/bot-rogerthat/followers","following_url":"https://api.github.com/users/bot-rogerthat/following{/other_user}","gists_url":"https://api.github.com/users/bot-rogerthat/gists{/gist_id}","starred_url":"https://api.github.com/users/bot-rogerthat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bot-rogerthat/subscriptions","organizations_url":"https://api.github.com/users/bot-rogerthat/orgs","repos_url":"https://api.github.com/users/bot-rogerthat/repos","events_url":"https://api.github.com/users/bot-rogerthat/events{/privacy}","received_events_url":"https://api.github.com/users/bot-rogerthat/received_events","type":"User","site_admin":false},"repo":{"id":45851173,"name":"IntUtil_and_Matrix","full_name":"bot-rogerthat/IntUtil_and_Matrix","owner":{"login":"bot-rogerthat","id":14311147,"avatar_url":"https://avatars.githubusercontent.com/u/14311147?v=3","gravatar_id":"","url":"https://api.github.com/users/bot-rogerthat","html_url":"https://github.com/bot-rogerthat","followers_url":"https://api.github.com/users/bot-rogerthat/followers","following_url":"https://api.github.com/users/bot-rogerthat/following{/other_user}","gists_url":"https://api.github.com/users/bot-rogerthat/gists{/gist_id}","starred_url":"https://api.github.com/users/bot-rogerthat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bot-rogerthat/subscriptions","organizations_url":"https://api.github.com/users/bot-rogerthat/orgs","repos_url":"https://api.github.com/users/bot-rogerthat/repos","events_url":"https://api.github.com/users/bot-rogerthat/events{/privacy}","received_events_url":"https://api.github.com/users/bot-rogerthat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix","description":"","fork":false,"url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix","forks_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/forks","keys_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/teams","hooks_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/hooks","issue_events_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/events{/number}","events_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/events","assignees_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/assignees{/user}","branches_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/branches{/branch}","tags_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/tags","blobs_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/refs{/sha}","trees_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/statuses/{sha}","languages_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/languages","stargazers_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/stargazers","contributors_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/contributors","subscribers_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/subscribers","subscription_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/subscription","commits_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/commits{/sha}","git_commits_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/git/commits{/sha}","comments_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/comments{/number}","issue_comment_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/comments{/number}","contents_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/contents/{+path}","compare_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/merges","archive_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/downloads","issues_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues{/number}","pulls_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls{/number}","milestones_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/milestones{/number}","notifications_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/labels{/name}","releases_url":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/releases{/id}","created_at":"2015-11-09T16:33:27Z","updated_at":"2015-11-09T16:33:27Z","pushed_at":"2015-11-09T16:40:13Z","git_url":"git://github.com/bot-rogerthat/IntUtil_and_Matrix.git","ssh_url":"git@github.com:bot-rogerthat/IntUtil_and_Matrix.git","clone_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix.git","svn_url":"https://github.com/bot-rogerthat/IntUtil_and_Matrix","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1"},"html":{"href":"https://github.com/bot-rogerthat/IntUtil_and_Matrix/pull/1"},"issue":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/1"},"comments":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/bot-rogerthat/IntUtil_and_Matrix/statuses/32796823a6e4a0ed8408043fda17ec8f50884c12"}}}}