{"action":"created","comment":{"url":"https://api.github.com/repos/Nikolay2015/vector/pulls/comments/44244260","id":44244260,"diff_hunk":"@@ -2,49 +2,161 @@\n #define VECTOR_H\n \n class Vector {\n-public:\n-  const static unsigned long n = 3;\n-\n-  Vector();\n-\n-  explicit Vector(double);\n-\n-  Vector(const Vector &);\n-\n-  Vector &operator=(const Vector &);\n-\n-  double operator[](unsigned long i) const;\n-\n-  double &operator[](unsigned long i);\n-\n-  Vector &operator+=(const Vector &);\n-\n-  Vector &operator-=(const Vector &);\n-\n-  Vector &operator*=(double);\n-\n-  Vector &operator/=(double);\n-\n-  friend bool operator==(const Vector &, const Vector &);\n-\n-  friend Vector operator+(const Vector &, const Vector &);\n-\n-  friend Vector operator-(const Vector &, const Vector &);\n-\n-  friend Vector operator*(const Vector &, double);\n-\n-  friend Vector operator*(double, const Vector &);\n-\n-  friend Vector operator/(const Vector &, double);\n-\n-  friend double operator^(const Vector &, const Vector &);\n-\n-  Vector operator-() const;\n \n+public:\n+\tconst static unsigned long n = 3;\n+\n+Vector()\n+{\n+\tfor (unsigned int i = 0; i < n; i++)\n+\t\tcoords_[i] = 0;\n+};\n+\n+explicit Vector(double number)\n+{\n+\tfor (unsigned int i = 0; i < n; i++)\n+\t\tcoords_[i] = number;\n+};\n+\n+Vector(const Vector &other)\n+{\n+\tfor (unsigned int i = 0; i < n; i++)\n+\t\tcoords_[i] = other.coords_[i];\n+};\n+\n+Vector &operator=(const Vector &other)\n+{\n+\tfor (unsigned int i = 0; i < n; i++)\n+\t\tcoords_[i] = other.coords_[i];\n+\treturn *this;\n+};\n+\n+double operator[](unsigned long i) const\n+{\n+\treturn coords_[i];\n+};\n+\n+double &operator[](unsigned long i)\n+{\n+\treturn coords_[i];\n+};\n+\t\n+Vector &operator+=(const Vector &other)\n+{\n+\tfor (unsigned int i = 0; i < n; i++)\n+\t\tcoords_[i] = coords_[i] + other.coords_[i];","path":"include/vector.h","position":84,"original_position":84,"commit_id":"d030915607b34343e89e98602f966a19eb8e1fd9","original_commit_id":"d030915607b34343e89e98602f966a19eb8e1fd9","user":{"login":"sdukshis","id":751874,"avatar_url":"https://avatars.githubusercontent.com/u/751874?v=3","gravatar_id":"","url":"https://api.github.com/users/sdukshis","html_url":"https://github.com/sdukshis","followers_url":"https://api.github.com/users/sdukshis/followers","following_url":"https://api.github.com/users/sdukshis/following{/other_user}","gists_url":"https://api.github.com/users/sdukshis/gists{/gist_id}","starred_url":"https://api.github.com/users/sdukshis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdukshis/subscriptions","organizations_url":"https://api.github.com/users/sdukshis/orgs","repos_url":"https://api.github.com/users/sdukshis/repos","events_url":"https://api.github.com/users/sdukshis/events{/privacy}","received_events_url":"https://api.github.com/users/sdukshis/received_events","type":"User","site_admin":false},"body":"`+=`","created_at":"2015-11-09T06:24:29Z","updated_at":"2015-11-09T06:24:29Z","html_url":"https://github.com/Nikolay2015/vector/pull/1#discussion_r44244260","pull_request_url":"https://api.github.com/repos/Nikolay2015/vector/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Nikolay2015/vector/pulls/comments/44244260"},"html":{"href":"https://github.com/Nikolay2015/vector/pull/1#discussion_r44244260"},"pull_request":{"href":"https://api.github.com/repos/Nikolay2015/vector/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Nikolay2015/vector/pulls/1","id":50064810,"html_url":"https://github.com/Nikolay2015/vector/pull/1","diff_url":"https://github.com/Nikolay2015/vector/pull/1.diff","patch_url":"https://github.com/Nikolay2015/vector/pull/1.patch","issue_url":"https://api.github.com/repos/Nikolay2015/vector/issues/1","number":1,"state":"open","locked":false,"title":"Newbranches","user":{"login":"Nikolay2015","id":15260574,"avatar_url":"https://avatars.githubusercontent.com/u/15260574?v=3","gravatar_id":"","url":"https://api.github.com/users/Nikolay2015","html_url":"https://github.com/Nikolay2015","followers_url":"https://api.github.com/users/Nikolay2015/followers","following_url":"https://api.github.com/users/Nikolay2015/following{/other_user}","gists_url":"https://api.github.com/users/Nikolay2015/gists{/gist_id}","starred_url":"https://api.github.com/users/Nikolay2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nikolay2015/subscriptions","organizations_url":"https://api.github.com/users/Nikolay2015/orgs","repos_url":"https://api.github.com/users/Nikolay2015/repos","events_url":"https://api.github.com/users/Nikolay2015/events{/privacy}","received_events_url":"https://api.github.com/users/Nikolay2015/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-08T17:21:44Z","updated_at":"2015-11-09T06:24:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b86aa41f19f359e28db6021f39a6c8aa4b488eb4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Nikolay2015/vector/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Nikolay2015/vector/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Nikolay2015/vector/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Nikolay2015/vector/issues/1/comments","statuses_url":"https://api.github.com/repos/Nikolay2015/vector/statuses/d030915607b34343e89e98602f966a19eb8e1fd9","head":{"label":"Nikolay2015:newbranches","ref":"newbranches","sha":"d030915607b34343e89e98602f966a19eb8e1fd9","user":{"login":"Nikolay2015","id":15260574,"avatar_url":"https://avatars.githubusercontent.com/u/15260574?v=3","gravatar_id":"","url":"https://api.github.com/users/Nikolay2015","html_url":"https://github.com/Nikolay2015","followers_url":"https://api.github.com/users/Nikolay2015/followers","following_url":"https://api.github.com/users/Nikolay2015/following{/other_user}","gists_url":"https://api.github.com/users/Nikolay2015/gists{/gist_id}","starred_url":"https://api.github.com/users/Nikolay2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nikolay2015/subscriptions","organizations_url":"https://api.github.com/users/Nikolay2015/orgs","repos_url":"https://api.github.com/users/Nikolay2015/repos","events_url":"https://api.github.com/users/Nikolay2015/events{/privacy}","received_events_url":"https://api.github.com/users/Nikolay2015/received_events","type":"User","site_admin":false},"repo":{"id":44799131,"name":"vector","full_name":"Nikolay2015/vector","owner":{"login":"Nikolay2015","id":15260574,"avatar_url":"https://avatars.githubusercontent.com/u/15260574?v=3","gravatar_id":"","url":"https://api.github.com/users/Nikolay2015","html_url":"https://github.com/Nikolay2015","followers_url":"https://api.github.com/users/Nikolay2015/followers","following_url":"https://api.github.com/users/Nikolay2015/following{/other_user}","gists_url":"https://api.github.com/users/Nikolay2015/gists{/gist_id}","starred_url":"https://api.github.com/users/Nikolay2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nikolay2015/subscriptions","organizations_url":"https://api.github.com/users/Nikolay2015/orgs","repos_url":"https://api.github.com/users/Nikolay2015/repos","events_url":"https://api.github.com/users/Nikolay2015/events{/privacy}","received_events_url":"https://api.github.com/users/Nikolay2015/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nikolay2015/vector","description":"Linear space element representation","fork":true,"url":"https://api.github.com/repos/Nikolay2015/vector","forks_url":"https://api.github.com/repos/Nikolay2015/vector/forks","keys_url":"https://api.github.com/repos/Nikolay2015/vector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nikolay2015/vector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nikolay2015/vector/teams","hooks_url":"https://api.github.com/repos/Nikolay2015/vector/hooks","issue_events_url":"https://api.github.com/repos/Nikolay2015/vector/issues/events{/number}","events_url":"https://api.github.com/repos/Nikolay2015/vector/events","assignees_url":"https://api.github.com/repos/Nikolay2015/vector/assignees{/user}","branches_url":"https://api.github.com/repos/Nikolay2015/vector/branches{/branch}","tags_url":"https://api.github.com/repos/Nikolay2015/vector/tags","blobs_url":"https://api.github.com/repos/Nikolay2015/vector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nikolay2015/vector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nikolay2015/vector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nikolay2015/vector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nikolay2015/vector/statuses/{sha}","languages_url":"https://api.github.com/repos/Nikolay2015/vector/languages","stargazers_url":"https://api.github.com/repos/Nikolay2015/vector/stargazers","contributors_url":"https://api.github.com/repos/Nikolay2015/vector/contributors","subscribers_url":"https://api.github.com/repos/Nikolay2015/vector/subscribers","subscription_url":"https://api.github.com/repos/Nikolay2015/vector/subscription","commits_url":"https://api.github.com/repos/Nikolay2015/vector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nikolay2015/vector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nikolay2015/vector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nikolay2015/vector/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nikolay2015/vector/contents/{+path}","compare_url":"https://api.github.com/repos/Nikolay2015/vector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nikolay2015/vector/merges","archive_url":"https://api.github.com/repos/Nikolay2015/vector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nikolay2015/vector/downloads","issues_url":"https://api.github.com/repos/Nikolay2015/vector/issues{/number}","pulls_url":"https://api.github.com/repos/Nikolay2015/vector/pulls{/number}","milestones_url":"https://api.github.com/repos/Nikolay2015/vector/milestones{/number}","notifications_url":"https://api.github.com/repos/Nikolay2015/vector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nikolay2015/vector/labels{/name}","releases_url":"https://api.github.com/repos/Nikolay2015/vector/releases{/id}","created_at":"2015-10-23T07:59:04Z","updated_at":"2015-11-06T09:28:23Z","pushed_at":"2015-11-08T17:21:45Z","git_url":"git://github.com/Nikolay2015/vector.git","ssh_url":"git@github.com:Nikolay2015/vector.git","clone_url":"https://github.com/Nikolay2015/vector.git","svn_url":"https://github.com/Nikolay2015/vector","homepage":null,"size":109,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"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":1,"default_branch":"master"}},"base":{"label":"Nikolay2015:master","ref":"master","sha":"ca2a3723b78964d5421dc6337ddcc8390decba8a","user":{"login":"Nikolay2015","id":15260574,"avatar_url":"https://avatars.githubusercontent.com/u/15260574?v=3","gravatar_id":"","url":"https://api.github.com/users/Nikolay2015","html_url":"https://github.com/Nikolay2015","followers_url":"https://api.github.com/users/Nikolay2015/followers","following_url":"https://api.github.com/users/Nikolay2015/following{/other_user}","gists_url":"https://api.github.com/users/Nikolay2015/gists{/gist_id}","starred_url":"https://api.github.com/users/Nikolay2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nikolay2015/subscriptions","organizations_url":"https://api.github.com/users/Nikolay2015/orgs","repos_url":"https://api.github.com/users/Nikolay2015/repos","events_url":"https://api.github.com/users/Nikolay2015/events{/privacy}","received_events_url":"https://api.github.com/users/Nikolay2015/received_events","type":"User","site_admin":false},"repo":{"id":44799131,"name":"vector","full_name":"Nikolay2015/vector","owner":{"login":"Nikolay2015","id":15260574,"avatar_url":"https://avatars.githubusercontent.com/u/15260574?v=3","gravatar_id":"","url":"https://api.github.com/users/Nikolay2015","html_url":"https://github.com/Nikolay2015","followers_url":"https://api.github.com/users/Nikolay2015/followers","following_url":"https://api.github.com/users/Nikolay2015/following{/other_user}","gists_url":"https://api.github.com/users/Nikolay2015/gists{/gist_id}","starred_url":"https://api.github.com/users/Nikolay2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nikolay2015/subscriptions","organizations_url":"https://api.github.com/users/Nikolay2015/orgs","repos_url":"https://api.github.com/users/Nikolay2015/repos","events_url":"https://api.github.com/users/Nikolay2015/events{/privacy}","received_events_url":"https://api.github.com/users/Nikolay2015/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nikolay2015/vector","description":"Linear space element representation","fork":true,"url":"https://api.github.com/repos/Nikolay2015/vector","forks_url":"https://api.github.com/repos/Nikolay2015/vector/forks","keys_url":"https://api.github.com/repos/Nikolay2015/vector/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nikolay2015/vector/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nikolay2015/vector/teams","hooks_url":"https://api.github.com/repos/Nikolay2015/vector/hooks","issue_events_url":"https://api.github.com/repos/Nikolay2015/vector/issues/events{/number}","events_url":"https://api.github.com/repos/Nikolay2015/vector/events","assignees_url":"https://api.github.com/repos/Nikolay2015/vector/assignees{/user}","branches_url":"https://api.github.com/repos/Nikolay2015/vector/branches{/branch}","tags_url":"https://api.github.com/repos/Nikolay2015/vector/tags","blobs_url":"https://api.github.com/repos/Nikolay2015/vector/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nikolay2015/vector/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nikolay2015/vector/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nikolay2015/vector/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nikolay2015/vector/statuses/{sha}","languages_url":"https://api.github.com/repos/Nikolay2015/vector/languages","stargazers_url":"https://api.github.com/repos/Nikolay2015/vector/stargazers","contributors_url":"https://api.github.com/repos/Nikolay2015/vector/contributors","subscribers_url":"https://api.github.com/repos/Nikolay2015/vector/subscribers","subscription_url":"https://api.github.com/repos/Nikolay2015/vector/subscription","commits_url":"https://api.github.com/repos/Nikolay2015/vector/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nikolay2015/vector/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nikolay2015/vector/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nikolay2015/vector/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nikolay2015/vector/contents/{+path}","compare_url":"https://api.github.com/repos/Nikolay2015/vector/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nikolay2015/vector/merges","archive_url":"https://api.github.com/repos/Nikolay2015/vector/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nikolay2015/vector/downloads","issues_url":"https://api.github.com/repos/Nikolay2015/vector/issues{/number}","pulls_url":"https://api.github.com/repos/Nikolay2015/vector/pulls{/number}","milestones_url":"https://api.github.com/repos/Nikolay2015/vector/milestones{/number}","notifications_url":"https://api.github.com/repos/Nikolay2015/vector/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nikolay2015/vector/labels{/name}","releases_url":"https://api.github.com/repos/Nikolay2015/vector/releases{/id}","created_at":"2015-10-23T07:59:04Z","updated_at":"2015-11-06T09:28:23Z","pushed_at":"2015-11-08T17:21:45Z","git_url":"git://github.com/Nikolay2015/vector.git","ssh_url":"git@github.com:Nikolay2015/vector.git","clone_url":"https://github.com/Nikolay2015/vector.git","svn_url":"https://github.com/Nikolay2015/vector","homepage":null,"size":109,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":false,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Nikolay2015/vector/pulls/1"},"html":{"href":"https://github.com/Nikolay2015/vector/pull/1"},"issue":{"href":"https://api.github.com/repos/Nikolay2015/vector/issues/1"},"comments":{"href":"https://api.github.com/repos/Nikolay2015/vector/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Nikolay2015/vector/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Nikolay2015/vector/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Nikolay2015/vector/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Nikolay2015/vector/statuses/d030915607b34343e89e98602f966a19eb8e1fd9"}}}}