{"action":"created","comment":{"url":"https://api.github.com/repos/yiskylee/NICE/pulls/comments/70307213","id":70307213,"diff_hunk":"@@ -48,8 +48,35 @@ class CpuOperations {\n     // Matrix-matrix multiplication\n     return a * b;\n   }\n-  static Matrix<T> Add(const Matrix<T> &a, const T &scalar);\n-  static Matrix<T> Add(const Matrix<T> &a, const Matrix<T> &b);\n+  static Matrix<T> Add(const Matrix<T> &a, const T &scalar) {\n+      // Does not work if matrix is empty.\n+      if (a.rows() == 0) {\n+        std::cerr << \"MATRICIES ARE EMPTY\";\n+        exit(1);\n+\n+      // Otherwise, code will run fine.\n+    } else {","path":"cpp/include/cpu_operations.h","position":13,"original_position":13,"commit_id":"17fff3a7582ebc1fc9ed213f5360332972ec84fa","original_commit_id":"17fff3a7582ebc1fc9ed213f5360332972ec84fa","user":{"login":"yiskylee","id":2600667,"avatar_url":"https://avatars.githubusercontent.com/u/2600667?v=3","gravatar_id":"","url":"https://api.github.com/users/yiskylee","html_url":"https://github.com/yiskylee","followers_url":"https://api.github.com/users/yiskylee/followers","following_url":"https://api.github.com/users/yiskylee/following{/other_user}","gists_url":"https://api.github.com/users/yiskylee/gists{/gist_id}","starred_url":"https://api.github.com/users/yiskylee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiskylee/subscriptions","organizations_url":"https://api.github.com/users/yiskylee/orgs","repos_url":"https://api.github.com/users/yiskylee/repos","events_url":"https://api.github.com/users/yiskylee/events{/privacy}","received_events_url":"https://api.github.com/users/yiskylee/received_events","type":"User","site_admin":false},"body":"here, use array() in Eigen to add scalar to a matrix, Jason posted the link in the campfire, also please let Anne know about this because she is working on scalar matrix subtraction as well.","created_at":"2016-07-11T18:06:28Z","updated_at":"2016-07-11T18:06:28Z","html_url":"https://github.com/yiskylee/NICE/pull/44#discussion_r70307213","pull_request_url":"https://api.github.com/repos/yiskylee/NICE/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/yiskylee/NICE/pulls/comments/70307213"},"html":{"href":"https://github.com/yiskylee/NICE/pull/44#discussion_r70307213"},"pull_request":{"href":"https://api.github.com/repos/yiskylee/NICE/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/yiskylee/NICE/pulls/44","id":76980904,"html_url":"https://github.com/yiskylee/NICE/pull/44","diff_url":"https://github.com/yiskylee/NICE/pull/44.diff","patch_url":"https://github.com/yiskylee/NICE/pull/44.patch","issue_url":"https://api.github.com/repos/yiskylee/NICE/issues/44","number":44,"state":"open","locked":false,"title":"Add (Matrix and Scalar)","user":{"login":"lesliechase","id":17048911,"avatar_url":"https://avatars.githubusercontent.com/u/17048911?v=3","gravatar_id":"","url":"https://api.github.com/users/lesliechase","html_url":"https://github.com/lesliechase","followers_url":"https://api.github.com/users/lesliechase/followers","following_url":"https://api.github.com/users/lesliechase/following{/other_user}","gists_url":"https://api.github.com/users/lesliechase/gists{/gist_id}","starred_url":"https://api.github.com/users/lesliechase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesliechase/subscriptions","organizations_url":"https://api.github.com/users/lesliechase/orgs","repos_url":"https://api.github.com/users/lesliechase/repos","events_url":"https://api.github.com/users/lesliechase/events{/privacy}","received_events_url":"https://api.github.com/users/lesliechase/received_events","type":"User","site_admin":false},"body":"Matt's code kind of disappeared and it I looked at it online through github and it didn't have checks for correct sized matricies etc. so I just redid the code and test file. All tests passed on my end.","created_at":"2016-07-11T16:11:28Z","updated_at":"2016-07-11T18:06:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b29cbfe2fb368af09be2d6502bec05ede54e53f0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yiskylee/NICE/pulls/44/commits","review_comments_url":"https://api.github.com/repos/yiskylee/NICE/pulls/44/comments","review_comment_url":"https://api.github.com/repos/yiskylee/NICE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yiskylee/NICE/issues/44/comments","statuses_url":"https://api.github.com/repos/yiskylee/NICE/statuses/17fff3a7582ebc1fc9ed213f5360332972ec84fa","head":{"label":"lesliechase:matt-add-branch","ref":"matt-add-branch","sha":"17fff3a7582ebc1fc9ed213f5360332972ec84fa","user":{"login":"lesliechase","id":17048911,"avatar_url":"https://avatars.githubusercontent.com/u/17048911?v=3","gravatar_id":"","url":"https://api.github.com/users/lesliechase","html_url":"https://github.com/lesliechase","followers_url":"https://api.github.com/users/lesliechase/followers","following_url":"https://api.github.com/users/lesliechase/following{/other_user}","gists_url":"https://api.github.com/users/lesliechase/gists{/gist_id}","starred_url":"https://api.github.com/users/lesliechase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesliechase/subscriptions","organizations_url":"https://api.github.com/users/lesliechase/orgs","repos_url":"https://api.github.com/users/lesliechase/repos","events_url":"https://api.github.com/users/lesliechase/events{/privacy}","received_events_url":"https://api.github.com/users/lesliechase/received_events","type":"User","site_admin":false},"repo":{"id":61239948,"name":"NICE","full_name":"lesliechase/NICE","owner":{"login":"lesliechase","id":17048911,"avatar_url":"https://avatars.githubusercontent.com/u/17048911?v=3","gravatar_id":"","url":"https://api.github.com/users/lesliechase","html_url":"https://github.com/lesliechase","followers_url":"https://api.github.com/users/lesliechase/followers","following_url":"https://api.github.com/users/lesliechase/following{/other_user}","gists_url":"https://api.github.com/users/lesliechase/gists{/gist_id}","starred_url":"https://api.github.com/users/lesliechase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesliechase/subscriptions","organizations_url":"https://api.github.com/users/lesliechase/orgs","repos_url":"https://api.github.com/users/lesliechase/repos","events_url":"https://api.github.com/users/lesliechase/events{/privacy}","received_events_url":"https://api.github.com/users/lesliechase/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lesliechase/NICE","description":"","fork":true,"url":"https://api.github.com/repos/lesliechase/NICE","forks_url":"https://api.github.com/repos/lesliechase/NICE/forks","keys_url":"https://api.github.com/repos/lesliechase/NICE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lesliechase/NICE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lesliechase/NICE/teams","hooks_url":"https://api.github.com/repos/lesliechase/NICE/hooks","issue_events_url":"https://api.github.com/repos/lesliechase/NICE/issues/events{/number}","events_url":"https://api.github.com/repos/lesliechase/NICE/events","assignees_url":"https://api.github.com/repos/lesliechase/NICE/assignees{/user}","branches_url":"https://api.github.com/repos/lesliechase/NICE/branches{/branch}","tags_url":"https://api.github.com/repos/lesliechase/NICE/tags","blobs_url":"https://api.github.com/repos/lesliechase/NICE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lesliechase/NICE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lesliechase/NICE/git/refs{/sha}","trees_url":"https://api.github.com/repos/lesliechase/NICE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lesliechase/NICE/statuses/{sha}","languages_url":"https://api.github.com/repos/lesliechase/NICE/languages","stargazers_url":"https://api.github.com/repos/lesliechase/NICE/stargazers","contributors_url":"https://api.github.com/repos/lesliechase/NICE/contributors","subscribers_url":"https://api.github.com/repos/lesliechase/NICE/subscribers","subscription_url":"https://api.github.com/repos/lesliechase/NICE/subscription","commits_url":"https://api.github.com/repos/lesliechase/NICE/commits{/sha}","git_commits_url":"https://api.github.com/repos/lesliechase/NICE/git/commits{/sha}","comments_url":"https://api.github.com/repos/lesliechase/NICE/comments{/number}","issue_comment_url":"https://api.github.com/repos/lesliechase/NICE/issues/comments{/number}","contents_url":"https://api.github.com/repos/lesliechase/NICE/contents/{+path}","compare_url":"https://api.github.com/repos/lesliechase/NICE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lesliechase/NICE/merges","archive_url":"https://api.github.com/repos/lesliechase/NICE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lesliechase/NICE/downloads","issues_url":"https://api.github.com/repos/lesliechase/NICE/issues{/number}","pulls_url":"https://api.github.com/repos/lesliechase/NICE/pulls{/number}","milestones_url":"https://api.github.com/repos/lesliechase/NICE/milestones{/number}","notifications_url":"https://api.github.com/repos/lesliechase/NICE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lesliechase/NICE/labels{/name}","releases_url":"https://api.github.com/repos/lesliechase/NICE/releases{/id}","deployments_url":"https://api.github.com/repos/lesliechase/NICE/deployments","created_at":"2016-06-15T20:48:04Z","updated_at":"2016-06-15T20:48:05Z","pushed_at":"2016-07-11T16:09:16Z","git_url":"git://github.com/lesliechase/NICE.git","ssh_url":"git@github.com:lesliechase/NICE.git","clone_url":"https://github.com/lesliechase/NICE.git","svn_url":"https://github.com/lesliechase/NICE","homepage":null,"size":36490,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":"develop"}},"base":{"label":"yiskylee:develop","ref":"develop","sha":"7fa933c9efebd778ce9c7a706e43e0b569863766","user":{"login":"yiskylee","id":2600667,"avatar_url":"https://avatars.githubusercontent.com/u/2600667?v=3","gravatar_id":"","url":"https://api.github.com/users/yiskylee","html_url":"https://github.com/yiskylee","followers_url":"https://api.github.com/users/yiskylee/followers","following_url":"https://api.github.com/users/yiskylee/following{/other_user}","gists_url":"https://api.github.com/users/yiskylee/gists{/gist_id}","starred_url":"https://api.github.com/users/yiskylee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiskylee/subscriptions","organizations_url":"https://api.github.com/users/yiskylee/orgs","repos_url":"https://api.github.com/users/yiskylee/repos","events_url":"https://api.github.com/users/yiskylee/events{/privacy}","received_events_url":"https://api.github.com/users/yiskylee/received_events","type":"User","site_admin":false},"repo":{"id":57996618,"name":"NICE","full_name":"yiskylee/NICE","owner":{"login":"yiskylee","id":2600667,"avatar_url":"https://avatars.githubusercontent.com/u/2600667?v=3","gravatar_id":"","url":"https://api.github.com/users/yiskylee","html_url":"https://github.com/yiskylee","followers_url":"https://api.github.com/users/yiskylee/followers","following_url":"https://api.github.com/users/yiskylee/following{/other_user}","gists_url":"https://api.github.com/users/yiskylee/gists{/gist_id}","starred_url":"https://api.github.com/users/yiskylee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiskylee/subscriptions","organizations_url":"https://api.github.com/users/yiskylee/orgs","repos_url":"https://api.github.com/users/yiskylee/repos","events_url":"https://api.github.com/users/yiskylee/events{/privacy}","received_events_url":"https://api.github.com/users/yiskylee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yiskylee/NICE","description":"","fork":false,"url":"https://api.github.com/repos/yiskylee/NICE","forks_url":"https://api.github.com/repos/yiskylee/NICE/forks","keys_url":"https://api.github.com/repos/yiskylee/NICE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yiskylee/NICE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yiskylee/NICE/teams","hooks_url":"https://api.github.com/repos/yiskylee/NICE/hooks","issue_events_url":"https://api.github.com/repos/yiskylee/NICE/issues/events{/number}","events_url":"https://api.github.com/repos/yiskylee/NICE/events","assignees_url":"https://api.github.com/repos/yiskylee/NICE/assignees{/user}","branches_url":"https://api.github.com/repos/yiskylee/NICE/branches{/branch}","tags_url":"https://api.github.com/repos/yiskylee/NICE/tags","blobs_url":"https://api.github.com/repos/yiskylee/NICE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yiskylee/NICE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yiskylee/NICE/git/refs{/sha}","trees_url":"https://api.github.com/repos/yiskylee/NICE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yiskylee/NICE/statuses/{sha}","languages_url":"https://api.github.com/repos/yiskylee/NICE/languages","stargazers_url":"https://api.github.com/repos/yiskylee/NICE/stargazers","contributors_url":"https://api.github.com/repos/yiskylee/NICE/contributors","subscribers_url":"https://api.github.com/repos/yiskylee/NICE/subscribers","subscription_url":"https://api.github.com/repos/yiskylee/NICE/subscription","commits_url":"https://api.github.com/repos/yiskylee/NICE/commits{/sha}","git_commits_url":"https://api.github.com/repos/yiskylee/NICE/git/commits{/sha}","comments_url":"https://api.github.com/repos/yiskylee/NICE/comments{/number}","issue_comment_url":"https://api.github.com/repos/yiskylee/NICE/issues/comments{/number}","contents_url":"https://api.github.com/repos/yiskylee/NICE/contents/{+path}","compare_url":"https://api.github.com/repos/yiskylee/NICE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yiskylee/NICE/merges","archive_url":"https://api.github.com/repos/yiskylee/NICE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yiskylee/NICE/downloads","issues_url":"https://api.github.com/repos/yiskylee/NICE/issues{/number}","pulls_url":"https://api.github.com/repos/yiskylee/NICE/pulls{/number}","milestones_url":"https://api.github.com/repos/yiskylee/NICE/milestones{/number}","notifications_url":"https://api.github.com/repos/yiskylee/NICE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yiskylee/NICE/labels{/name}","releases_url":"https://api.github.com/repos/yiskylee/NICE/releases{/id}","deployments_url":"https://api.github.com/repos/yiskylee/NICE/deployments","created_at":"2016-05-03T19:36:23Z","updated_at":"2016-06-09T21:08:12Z","pushed_at":"2016-07-11T17:20:13Z","git_url":"git://github.com/yiskylee/NICE.git","ssh_url":"git@github.com:yiskylee/NICE.git","clone_url":"https://github.com/yiskylee/NICE.git","svn_url":"https://github.com/yiskylee/NICE","homepage":null,"size":36523,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":5,"forks":10,"open_issues":5,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/yiskylee/NICE/pulls/44"},"html":{"href":"https://github.com/yiskylee/NICE/pull/44"},"issue":{"href":"https://api.github.com/repos/yiskylee/NICE/issues/44"},"comments":{"href":"https://api.github.com/repos/yiskylee/NICE/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/yiskylee/NICE/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/yiskylee/NICE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yiskylee/NICE/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/yiskylee/NICE/statuses/17fff3a7582ebc1fc9ed213f5360332972ec84fa"}}}}
{"actor":{"display_login":"yiskylee"}}