{"action":"created","comment":{"url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/comments/208620583","pull_request_review_id":144467364,"id":208620583,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODYyMDU4Mw==","diff_hunk":"@@ -78,18 +78,30 @@ class mtx_reader {\n     {\n         auto parsed_header = this->read_header(is);\n         std::istringstream dimensions_stream(parsed_header.dimensions_line);\n-        auto data = parsed_header.layout_reader->read_data(\n-            dimensions_stream, is, parsed_header.entry_reader,\n-            parsed_header.layout_reader_modifier);\n+        auto data = parsed_header.layout->read_data(\n+            dimensions_stream, is, parsed_header.entry, parsed_header.modifier);\n         data.ensure_row_major_order();\n         return data;\n     }\n \n+    void write(std::ostream &os, const matrix_data<ValueType, IndexType> &data,\n+               const std::string &header) const\n+    {\n+        std::istringstream header_stream(header);\n+        auto parsed_header = this->read_description_line(header_stream);\n+        CHECK_STREAM(os << header,\n+                     \"error when writing the matrix market header\");\n+        parsed_header.layout->write_data(os, data, parsed_header.entry,\n+                                         parsed_header.modifier);\n+    }\n+\n private:\n     // entry format hierarchy provides algorithms for reading a single entry of","path":"core/base/mtx_io.cpp","position":51,"original_position":51,"commit_id":"992b0f3f3ca22aaed17152013d16e4480e6326e5","original_commit_id":"992b0f3f3ca22aaed17152013d16e4480e6326e5","user":{"login":"tcojean","id":35342290,"node_id":"MDQ6VXNlcjM1MzQyMjkw","avatar_url":"https://avatars1.githubusercontent.com/u/35342290?v=4","gravatar_id":"","url":"https://api.github.com/users/tcojean","html_url":"https://github.com/tcojean","followers_url":"https://api.github.com/users/tcojean/followers","following_url":"https://api.github.com/users/tcojean/following{/other_user}","gists_url":"https://api.github.com/users/tcojean/gists{/gist_id}","starred_url":"https://api.github.com/users/tcojean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcojean/subscriptions","organizations_url":"https://api.github.com/users/tcojean/orgs","repos_url":"https://api.github.com/users/tcojean/repos","events_url":"https://api.github.com/users/tcojean/events{/privacy}","received_events_url":"https://api.github.com/users/tcojean/received_events","type":"User","site_admin":false},"body":"nit: Technically it's not only reading now. Also in most other similar comments.","created_at":"2018-08-08T15:11:28Z","updated_at":"2018-08-08T15:35:18Z","html_url":"https://github.com/ginkgo-project/ginkgo/pull/98#discussion_r208620583","pull_request_url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/comments/208620583"},"html":{"href":"https://github.com/ginkgo-project/ginkgo/pull/98#discussion_r208620583"},"pull_request":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98"}}},"pull_request":{"url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98","id":206056071,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MDU2MDcx","html_url":"https://github.com/ginkgo-project/ginkgo/pull/98","diff_url":"https://github.com/ginkgo-project/ginkgo/pull/98.diff","patch_url":"https://github.com/ginkgo-project/ginkgo/pull/98.patch","issue_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/98","number":98,"state":"open","locked":false,"title":"Matrix market writer","user":{"login":"gflegar","id":1261711,"node_id":"MDQ6VXNlcjEyNjE3MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1261711?v=4","gravatar_id":"","url":"https://api.github.com/users/gflegar","html_url":"https://github.com/gflegar","followers_url":"https://api.github.com/users/gflegar/followers","following_url":"https://api.github.com/users/gflegar/following{/other_user}","gists_url":"https://api.github.com/users/gflegar/gists{/gist_id}","starred_url":"https://api.github.com/users/gflegar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gflegar/subscriptions","organizations_url":"https://api.github.com/users/gflegar/orgs","repos_url":"https://api.github.com/users/gflegar/repos","events_url":"https://api.github.com/users/gflegar/events{/privacy}","received_events_url":"https://api.github.com/users/gflegar/received_events","type":"User","site_admin":false},"body":"This PR adds functions for writing matrices to streams in matrix market format.\r\nThe current implementation supports both `array` and `coordinate` layouts, but does not support modifiers (symmetric, hermitian, etc.), and only the `real` and `complex` value types (`integer` and `pattern` are not supported).\r\n\r\nThe examples have also been modified to use these functions instead of writing out the vectors by hand.\r\n\r\nSince the name `mtx_reader` doesn't make much sense if it can also write data the header has been renamed to `mtx_io`.","created_at":"2018-08-03T14:57:31Z","updated_at":"2018-08-08T15:35:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f69aaa1c4252aa9378e1a1cf6cc277aa1a5a3dd2","assignee":{"login":"gflegar","id":1261711,"node_id":"MDQ6VXNlcjEyNjE3MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1261711?v=4","gravatar_id":"","url":"https://api.github.com/users/gflegar","html_url":"https://github.com/gflegar","followers_url":"https://api.github.com/users/gflegar/followers","following_url":"https://api.github.com/users/gflegar/following{/other_user}","gists_url":"https://api.github.com/users/gflegar/gists{/gist_id}","starred_url":"https://api.github.com/users/gflegar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gflegar/subscriptions","organizations_url":"https://api.github.com/users/gflegar/orgs","repos_url":"https://api.github.com/users/gflegar/repos","events_url":"https://api.github.com/users/gflegar/events{/privacy}","received_events_url":"https://api.github.com/users/gflegar/received_events","type":"User","site_admin":false},"assignees":[{"login":"gflegar","id":1261711,"node_id":"MDQ6VXNlcjEyNjE3MTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1261711?v=4","gravatar_id":"","url":"https://api.github.com/users/gflegar","html_url":"https://github.com/gflegar","followers_url":"https://api.github.com/users/gflegar/followers","following_url":"https://api.github.com/users/gflegar/following{/other_user}","gists_url":"https://api.github.com/users/gflegar/gists{/gist_id}","starred_url":"https://api.github.com/users/gflegar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gflegar/subscriptions","organizations_url":"https://api.github.com/users/gflegar/orgs","repos_url":"https://api.github.com/users/gflegar/repos","events_url":"https://api.github.com/users/gflegar/events{/privacy}","received_events_url":"https://api.github.com/users/gflegar/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":978495766,"node_id":"MDU6TGFiZWw5Nzg0OTU3NjY=","url":"https://api.github.com/repos/ginkgo-project/ginkgo/labels/Core","name":"Core","color":"ECC832","default":false},{"id":830146004,"node_id":"MDU6TGFiZWw4MzAxNDYwMDQ=","url":"https://api.github.com/repos/ginkgo-project/ginkgo/labels/Task","name":"Task","color":"0033CC","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98/commits","review_comments_url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98/comments","review_comment_url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/98/comments","statuses_url":"https://api.github.com/repos/ginkgo-project/ginkgo/statuses/992b0f3f3ca22aaed17152013d16e4480e6326e5","head":{"label":"ginkgo-project:mtx_writer","ref":"mtx_writer","sha":"992b0f3f3ca22aaed17152013d16e4480e6326e5","user":{"login":"ginkgo-project","id":35341738,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQxNzM4","avatar_url":"https://avatars2.githubusercontent.com/u/35341738?v=4","gravatar_id":"","url":"https://api.github.com/users/ginkgo-project","html_url":"https://github.com/ginkgo-project","followers_url":"https://api.github.com/users/ginkgo-project/followers","following_url":"https://api.github.com/users/ginkgo-project/following{/other_user}","gists_url":"https://api.github.com/users/ginkgo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ginkgo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ginkgo-project/subscriptions","organizations_url":"https://api.github.com/users/ginkgo-project/orgs","repos_url":"https://api.github.com/users/ginkgo-project/repos","events_url":"https://api.github.com/users/ginkgo-project/events{/privacy}","received_events_url":"https://api.github.com/users/ginkgo-project/received_events","type":"Organization","site_admin":false},"repo":{"id":117122510,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxMjI1MTA=","name":"ginkgo","full_name":"ginkgo-project/ginkgo","owner":{"login":"ginkgo-project","id":35341738,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQxNzM4","avatar_url":"https://avatars2.githubusercontent.com/u/35341738?v=4","gravatar_id":"","url":"https://api.github.com/users/ginkgo-project","html_url":"https://github.com/ginkgo-project","followers_url":"https://api.github.com/users/ginkgo-project/followers","following_url":"https://api.github.com/users/ginkgo-project/following{/other_user}","gists_url":"https://api.github.com/users/ginkgo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ginkgo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ginkgo-project/subscriptions","organizations_url":"https://api.github.com/users/ginkgo-project/orgs","repos_url":"https://api.github.com/users/ginkgo-project/repos","events_url":"https://api.github.com/users/ginkgo-project/events{/privacy}","received_events_url":"https://api.github.com/users/ginkgo-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ginkgo-project/ginkgo","description":"Numerical linear algebra software package","fork":false,"url":"https://api.github.com/repos/ginkgo-project/ginkgo","forks_url":"https://api.github.com/repos/ginkgo-project/ginkgo/forks","keys_url":"https://api.github.com/repos/ginkgo-project/ginkgo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ginkgo-project/ginkgo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ginkgo-project/ginkgo/teams","hooks_url":"https://api.github.com/repos/ginkgo-project/ginkgo/hooks","issue_events_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/events{/number}","events_url":"https://api.github.com/repos/ginkgo-project/ginkgo/events","assignees_url":"https://api.github.com/repos/ginkgo-project/ginkgo/assignees{/user}","branches_url":"https://api.github.com/repos/ginkgo-project/ginkgo/branches{/branch}","tags_url":"https://api.github.com/repos/ginkgo-project/ginkgo/tags","blobs_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ginkgo-project/ginkgo/statuses/{sha}","languages_url":"https://api.github.com/repos/ginkgo-project/ginkgo/languages","stargazers_url":"https://api.github.com/repos/ginkgo-project/ginkgo/stargazers","contributors_url":"https://api.github.com/repos/ginkgo-project/ginkgo/contributors","subscribers_url":"https://api.github.com/repos/ginkgo-project/ginkgo/subscribers","subscription_url":"https://api.github.com/repos/ginkgo-project/ginkgo/subscription","commits_url":"https://api.github.com/repos/ginkgo-project/ginkgo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ginkgo-project/ginkgo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/comments{/number}","contents_url":"https://api.github.com/repos/ginkgo-project/ginkgo/contents/{+path}","compare_url":"https://api.github.com/repos/ginkgo-project/ginkgo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ginkgo-project/ginkgo/merges","archive_url":"https://api.github.com/repos/ginkgo-project/ginkgo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ginkgo-project/ginkgo/downloads","issues_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues{/number}","pulls_url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls{/number}","milestones_url":"https://api.github.com/repos/ginkgo-project/ginkgo/milestones{/number}","notifications_url":"https://api.github.com/repos/ginkgo-project/ginkgo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ginkgo-project/ginkgo/labels{/name}","releases_url":"https://api.github.com/repos/ginkgo-project/ginkgo/releases{/id}","deployments_url":"https://api.github.com/repos/ginkgo-project/ginkgo/deployments","created_at":"2018-01-11T16:14:21Z","updated_at":"2018-08-06T16:35:01Z","pushed_at":"2018-08-07T08:41:45Z","git_url":"git://github.com/ginkgo-project/ginkgo.git","ssh_url":"git@github.com:ginkgo-project/ginkgo.git","clone_url":"https://github.com/ginkgo-project/ginkgo.git","svn_url":"https://github.com/ginkgo-project/ginkgo","homepage":null,"size":3258,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":27,"watchers":7,"default_branch":"develop"}},"base":{"label":"ginkgo-project:develop","ref":"develop","sha":"9e6da9f054abce20bf338eab4c8145d2bbbae36a","user":{"login":"ginkgo-project","id":35341738,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQxNzM4","avatar_url":"https://avatars2.githubusercontent.com/u/35341738?v=4","gravatar_id":"","url":"https://api.github.com/users/ginkgo-project","html_url":"https://github.com/ginkgo-project","followers_url":"https://api.github.com/users/ginkgo-project/followers","following_url":"https://api.github.com/users/ginkgo-project/following{/other_user}","gists_url":"https://api.github.com/users/ginkgo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ginkgo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ginkgo-project/subscriptions","organizations_url":"https://api.github.com/users/ginkgo-project/orgs","repos_url":"https://api.github.com/users/ginkgo-project/repos","events_url":"https://api.github.com/users/ginkgo-project/events{/privacy}","received_events_url":"https://api.github.com/users/ginkgo-project/received_events","type":"Organization","site_admin":false},"repo":{"id":117122510,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxMjI1MTA=","name":"ginkgo","full_name":"ginkgo-project/ginkgo","owner":{"login":"ginkgo-project","id":35341738,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzQxNzM4","avatar_url":"https://avatars2.githubusercontent.com/u/35341738?v=4","gravatar_id":"","url":"https://api.github.com/users/ginkgo-project","html_url":"https://github.com/ginkgo-project","followers_url":"https://api.github.com/users/ginkgo-project/followers","following_url":"https://api.github.com/users/ginkgo-project/following{/other_user}","gists_url":"https://api.github.com/users/ginkgo-project/gists{/gist_id}","starred_url":"https://api.github.com/users/ginkgo-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ginkgo-project/subscriptions","organizations_url":"https://api.github.com/users/ginkgo-project/orgs","repos_url":"https://api.github.com/users/ginkgo-project/repos","events_url":"https://api.github.com/users/ginkgo-project/events{/privacy}","received_events_url":"https://api.github.com/users/ginkgo-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ginkgo-project/ginkgo","description":"Numerical linear algebra software package","fork":false,"url":"https://api.github.com/repos/ginkgo-project/ginkgo","forks_url":"https://api.github.com/repos/ginkgo-project/ginkgo/forks","keys_url":"https://api.github.com/repos/ginkgo-project/ginkgo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ginkgo-project/ginkgo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ginkgo-project/ginkgo/teams","hooks_url":"https://api.github.com/repos/ginkgo-project/ginkgo/hooks","issue_events_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/events{/number}","events_url":"https://api.github.com/repos/ginkgo-project/ginkgo/events","assignees_url":"https://api.github.com/repos/ginkgo-project/ginkgo/assignees{/user}","branches_url":"https://api.github.com/repos/ginkgo-project/ginkgo/branches{/branch}","tags_url":"https://api.github.com/repos/ginkgo-project/ginkgo/tags","blobs_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/refs{/sha}","trees_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ginkgo-project/ginkgo/statuses/{sha}","languages_url":"https://api.github.com/repos/ginkgo-project/ginkgo/languages","stargazers_url":"https://api.github.com/repos/ginkgo-project/ginkgo/stargazers","contributors_url":"https://api.github.com/repos/ginkgo-project/ginkgo/contributors","subscribers_url":"https://api.github.com/repos/ginkgo-project/ginkgo/subscribers","subscription_url":"https://api.github.com/repos/ginkgo-project/ginkgo/subscription","commits_url":"https://api.github.com/repos/ginkgo-project/ginkgo/commits{/sha}","git_commits_url":"https://api.github.com/repos/ginkgo-project/ginkgo/git/commits{/sha}","comments_url":"https://api.github.com/repos/ginkgo-project/ginkgo/comments{/number}","issue_comment_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/comments{/number}","contents_url":"https://api.github.com/repos/ginkgo-project/ginkgo/contents/{+path}","compare_url":"https://api.github.com/repos/ginkgo-project/ginkgo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ginkgo-project/ginkgo/merges","archive_url":"https://api.github.com/repos/ginkgo-project/ginkgo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ginkgo-project/ginkgo/downloads","issues_url":"https://api.github.com/repos/ginkgo-project/ginkgo/issues{/number}","pulls_url":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls{/number}","milestones_url":"https://api.github.com/repos/ginkgo-project/ginkgo/milestones{/number}","notifications_url":"https://api.github.com/repos/ginkgo-project/ginkgo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ginkgo-project/ginkgo/labels{/name}","releases_url":"https://api.github.com/repos/ginkgo-project/ginkgo/releases{/id}","deployments_url":"https://api.github.com/repos/ginkgo-project/ginkgo/deployments","created_at":"2018-01-11T16:14:21Z","updated_at":"2018-08-06T16:35:01Z","pushed_at":"2018-08-07T08:41:45Z","git_url":"git://github.com/ginkgo-project/ginkgo.git","ssh_url":"git@github.com:ginkgo-project/ginkgo.git","clone_url":"https://github.com/ginkgo-project/ginkgo.git","svn_url":"https://github.com/ginkgo-project/ginkgo","homepage":null,"size":3258,"stargazers_count":7,"watchers_count":7,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":2,"open_issues":27,"watchers":7,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98"},"html":{"href":"https://github.com/ginkgo-project/ginkgo/pull/98"},"issue":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/98"},"comments":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/issues/98/comments"},"review_comments":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98/comments"},"review_comment":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/pulls/98/commits"},"statuses":{"href":"https://api.github.com/repos/ginkgo-project/ginkgo/statuses/992b0f3f3ca22aaed17152013d16e4480e6326e5"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"tcojean"}}