{"action":"created","comment":{"url":"https://api.github.com/repos/mdaus/coda-oss/pulls/comments/32182938","id":32182938,"diff_hunk":"@@ -250,6 +251,79 @@ inline math::poly::TwoD<double> fit(size_t numRows,\n \n     return fit(xm, ym, zm, nx, ny);\n }\n+\n+typedef math::linear::VectorN<3, double> Vector3;\n+\n+inline math::poly::OneD<Vector3> fit(\n+    const math::linear::Vector<double>& xObs,\n+    const math::linear::Vector<double>& yObs0,\n+    const math::linear::Vector<double>& yObs1,\n+    const math::linear::Vector<double>& yObs2,\n+    size_t numCoeffs)\n+{\n+    size_t numObs = xObs.size();\n+    if (yObs0.size() != numObs || yObs1.size() != numObs || yObs2.size() != numObs)\n+    {\n+        throw except::Exception(Ctxt(\"Must have the same number of observed y values as observed x values\"));\n+    }\n+    if (numCoeffs < 1)\n+    {\n+        throw except::Exception(Ctxt(\"Number of coefficients must be >= 1\"));\n+    }\n+\n+    math::poly::OneD<double> fit0 = fit(xObs, yObs0, numCoeffs);","path":"modules/c++/math.poly/include/math/poly/Fit.h","position":75,"original_position":75,"commit_id":"018f987341ded81d50301b535174b7739f91fb91","original_commit_id":"018f987341ded81d50301b535174b7739f91fb91","user":{"login":"asylvest","id":11707082,"avatar_url":"https://avatars.githubusercontent.com/u/11707082?v=3","gravatar_id":"","url":"https://api.github.com/users/asylvest","html_url":"https://github.com/asylvest","followers_url":"https://api.github.com/users/asylvest/followers","following_url":"https://api.github.com/users/asylvest/following{/other_user}","gists_url":"https://api.github.com/users/asylvest/gists{/gist_id}","starred_url":"https://api.github.com/users/asylvest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asylvest/subscriptions","organizations_url":"https://api.github.com/users/asylvest/orgs","repos_url":"https://api.github.com/users/asylvest/repos","events_url":"https://api.github.com/users/asylvest/events{/privacy}","received_events_url":"https://api.github.com/users/asylvest/received_events","type":"User","site_admin":false},"body":"fit0, fit1, and fit2 can all be const","created_at":"2015-06-11T01:18:41Z","updated_at":"2015-06-11T01:18:41Z","html_url":"https://github.com/mdaus/coda-oss/pull/21#discussion_r32182938","pull_request_url":"https://api.github.com/repos/mdaus/coda-oss/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/mdaus/coda-oss/pulls/comments/32182938"},"html":{"href":"https://github.com/mdaus/coda-oss/pull/21#discussion_r32182938"},"pull_request":{"href":"https://api.github.com/repos/mdaus/coda-oss/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/mdaus/coda-oss/pulls/21","id":37401925,"html_url":"https://github.com/mdaus/coda-oss/pull/21","diff_url":"https://github.com/mdaus/coda-oss/pull/21.diff","patch_url":"https://github.com/mdaus/coda-oss/pull/21.patch","issue_url":"https://api.github.com/repos/mdaus/coda-oss/issues/21","number":21,"state":"open","locked":false,"title":"Cpa 67 fit poly vector3","user":{"login":"EMullerMDA","id":12279379,"avatar_url":"https://avatars.githubusercontent.com/u/12279379?v=3","gravatar_id":"","url":"https://api.github.com/users/EMullerMDA","html_url":"https://github.com/EMullerMDA","followers_url":"https://api.github.com/users/EMullerMDA/followers","following_url":"https://api.github.com/users/EMullerMDA/following{/other_user}","gists_url":"https://api.github.com/users/EMullerMDA/gists{/gist_id}","starred_url":"https://api.github.com/users/EMullerMDA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EMullerMDA/subscriptions","organizations_url":"https://api.github.com/users/EMullerMDA/orgs","repos_url":"https://api.github.com/users/EMullerMDA/repos","events_url":"https://api.github.com/users/EMullerMDA/events{/privacy}","received_events_url":"https://api.github.com/users/EMullerMDA/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-10T20:40:08Z","updated_at":"2015-06-11T01:18:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6d89ca69508ee47bc30804902b4fea4dd4bfa50","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mdaus/coda-oss/pulls/21/commits","review_comments_url":"https://api.github.com/repos/mdaus/coda-oss/pulls/21/comments","review_comment_url":"https://api.github.com/repos/mdaus/coda-oss/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdaus/coda-oss/issues/21/comments","statuses_url":"https://api.github.com/repos/mdaus/coda-oss/statuses/018f987341ded81d50301b535174b7739f91fb91","head":{"label":"mdaus:CPA-67_Fit_PolyVector3","ref":"CPA-67_Fit_PolyVector3","sha":"018f987341ded81d50301b535174b7739f91fb91","user":{"login":"mdaus","id":11707119,"avatar_url":"https://avatars.githubusercontent.com/u/11707119?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaus","html_url":"https://github.com/mdaus","followers_url":"https://api.github.com/users/mdaus/followers","following_url":"https://api.github.com/users/mdaus/following{/other_user}","gists_url":"https://api.github.com/users/mdaus/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaus/subscriptions","organizations_url":"https://api.github.com/users/mdaus/orgs","repos_url":"https://api.github.com/users/mdaus/repos","events_url":"https://api.github.com/users/mdaus/events{/privacy}","received_events_url":"https://api.github.com/users/mdaus/received_events","type":"Organization","site_admin":false},"repo":{"id":33076757,"name":"coda-oss","full_name":"mdaus/coda-oss","owner":{"login":"mdaus","id":11707119,"avatar_url":"https://avatars.githubusercontent.com/u/11707119?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaus","html_url":"https://github.com/mdaus","followers_url":"https://api.github.com/users/mdaus/followers","following_url":"https://api.github.com/users/mdaus/following{/other_user}","gists_url":"https://api.github.com/users/mdaus/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaus/subscriptions","organizations_url":"https://api.github.com/users/mdaus/orgs","repos_url":"https://api.github.com/users/mdaus/repos","events_url":"https://api.github.com/users/mdaus/events{/privacy}","received_events_url":"https://api.github.com/users/mdaus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdaus/coda-oss","description":"The Common Open Development Archive (CODA-OSS) is a set of open source, modular components developed by MDA Information Systems LLC, primarily as a portable runtime for C++ processing.","fork":false,"url":"https://api.github.com/repos/mdaus/coda-oss","forks_url":"https://api.github.com/repos/mdaus/coda-oss/forks","keys_url":"https://api.github.com/repos/mdaus/coda-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdaus/coda-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdaus/coda-oss/teams","hooks_url":"https://api.github.com/repos/mdaus/coda-oss/hooks","issue_events_url":"https://api.github.com/repos/mdaus/coda-oss/issues/events{/number}","events_url":"https://api.github.com/repos/mdaus/coda-oss/events","assignees_url":"https://api.github.com/repos/mdaus/coda-oss/assignees{/user}","branches_url":"https://api.github.com/repos/mdaus/coda-oss/branches{/branch}","tags_url":"https://api.github.com/repos/mdaus/coda-oss/tags","blobs_url":"https://api.github.com/repos/mdaus/coda-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdaus/coda-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdaus/coda-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdaus/coda-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdaus/coda-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/mdaus/coda-oss/languages","stargazers_url":"https://api.github.com/repos/mdaus/coda-oss/stargazers","contributors_url":"https://api.github.com/repos/mdaus/coda-oss/contributors","subscribers_url":"https://api.github.com/repos/mdaus/coda-oss/subscribers","subscription_url":"https://api.github.com/repos/mdaus/coda-oss/subscription","commits_url":"https://api.github.com/repos/mdaus/coda-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdaus/coda-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdaus/coda-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdaus/coda-oss/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdaus/coda-oss/contents/{+path}","compare_url":"https://api.github.com/repos/mdaus/coda-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdaus/coda-oss/merges","archive_url":"https://api.github.com/repos/mdaus/coda-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdaus/coda-oss/downloads","issues_url":"https://api.github.com/repos/mdaus/coda-oss/issues{/number}","pulls_url":"https://api.github.com/repos/mdaus/coda-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/mdaus/coda-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/mdaus/coda-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdaus/coda-oss/labels{/name}","releases_url":"https://api.github.com/repos/mdaus/coda-oss/releases{/id}","created_at":"2015-03-29T14:48:12Z","updated_at":"2015-05-21T18:41:14Z","pushed_at":"2015-06-10T21:21:29Z","git_url":"git://github.com/mdaus/coda-oss.git","ssh_url":"git@github.com:mdaus/coda-oss.git","clone_url":"https://github.com/mdaus/coda-oss.git","svn_url":"https://github.com/mdaus/coda-oss","homepage":null,"size":181041,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":4,"default_branch":"master"}},"base":{"label":"mdaus:master","ref":"master","sha":"03edfe8b67c410003475a83ef56c7dceb74d675c","user":{"login":"mdaus","id":11707119,"avatar_url":"https://avatars.githubusercontent.com/u/11707119?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaus","html_url":"https://github.com/mdaus","followers_url":"https://api.github.com/users/mdaus/followers","following_url":"https://api.github.com/users/mdaus/following{/other_user}","gists_url":"https://api.github.com/users/mdaus/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaus/subscriptions","organizations_url":"https://api.github.com/users/mdaus/orgs","repos_url":"https://api.github.com/users/mdaus/repos","events_url":"https://api.github.com/users/mdaus/events{/privacy}","received_events_url":"https://api.github.com/users/mdaus/received_events","type":"Organization","site_admin":false},"repo":{"id":33076757,"name":"coda-oss","full_name":"mdaus/coda-oss","owner":{"login":"mdaus","id":11707119,"avatar_url":"https://avatars.githubusercontent.com/u/11707119?v=3","gravatar_id":"","url":"https://api.github.com/users/mdaus","html_url":"https://github.com/mdaus","followers_url":"https://api.github.com/users/mdaus/followers","following_url":"https://api.github.com/users/mdaus/following{/other_user}","gists_url":"https://api.github.com/users/mdaus/gists{/gist_id}","starred_url":"https://api.github.com/users/mdaus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdaus/subscriptions","organizations_url":"https://api.github.com/users/mdaus/orgs","repos_url":"https://api.github.com/users/mdaus/repos","events_url":"https://api.github.com/users/mdaus/events{/privacy}","received_events_url":"https://api.github.com/users/mdaus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdaus/coda-oss","description":"The Common Open Development Archive (CODA-OSS) is a set of open source, modular components developed by MDA Information Systems LLC, primarily as a portable runtime for C++ processing.","fork":false,"url":"https://api.github.com/repos/mdaus/coda-oss","forks_url":"https://api.github.com/repos/mdaus/coda-oss/forks","keys_url":"https://api.github.com/repos/mdaus/coda-oss/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdaus/coda-oss/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdaus/coda-oss/teams","hooks_url":"https://api.github.com/repos/mdaus/coda-oss/hooks","issue_events_url":"https://api.github.com/repos/mdaus/coda-oss/issues/events{/number}","events_url":"https://api.github.com/repos/mdaus/coda-oss/events","assignees_url":"https://api.github.com/repos/mdaus/coda-oss/assignees{/user}","branches_url":"https://api.github.com/repos/mdaus/coda-oss/branches{/branch}","tags_url":"https://api.github.com/repos/mdaus/coda-oss/tags","blobs_url":"https://api.github.com/repos/mdaus/coda-oss/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdaus/coda-oss/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdaus/coda-oss/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdaus/coda-oss/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdaus/coda-oss/statuses/{sha}","languages_url":"https://api.github.com/repos/mdaus/coda-oss/languages","stargazers_url":"https://api.github.com/repos/mdaus/coda-oss/stargazers","contributors_url":"https://api.github.com/repos/mdaus/coda-oss/contributors","subscribers_url":"https://api.github.com/repos/mdaus/coda-oss/subscribers","subscription_url":"https://api.github.com/repos/mdaus/coda-oss/subscription","commits_url":"https://api.github.com/repos/mdaus/coda-oss/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdaus/coda-oss/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdaus/coda-oss/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdaus/coda-oss/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdaus/coda-oss/contents/{+path}","compare_url":"https://api.github.com/repos/mdaus/coda-oss/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdaus/coda-oss/merges","archive_url":"https://api.github.com/repos/mdaus/coda-oss/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdaus/coda-oss/downloads","issues_url":"https://api.github.com/repos/mdaus/coda-oss/issues{/number}","pulls_url":"https://api.github.com/repos/mdaus/coda-oss/pulls{/number}","milestones_url":"https://api.github.com/repos/mdaus/coda-oss/milestones{/number}","notifications_url":"https://api.github.com/repos/mdaus/coda-oss/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdaus/coda-oss/labels{/name}","releases_url":"https://api.github.com/repos/mdaus/coda-oss/releases{/id}","created_at":"2015-03-29T14:48:12Z","updated_at":"2015-05-21T18:41:14Z","pushed_at":"2015-06-10T21:21:29Z","git_url":"git://github.com/mdaus/coda-oss.git","ssh_url":"git@github.com:mdaus/coda-oss.git","clone_url":"https://github.com/mdaus/coda-oss.git","svn_url":"https://github.com/mdaus/coda-oss","homepage":null,"size":181041,"stargazers_count":4,"watchers_count":4,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":5,"forks":2,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mdaus/coda-oss/pulls/21"},"html":{"href":"https://github.com/mdaus/coda-oss/pull/21"},"issue":{"href":"https://api.github.com/repos/mdaus/coda-oss/issues/21"},"comments":{"href":"https://api.github.com/repos/mdaus/coda-oss/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/mdaus/coda-oss/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/mdaus/coda-oss/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdaus/coda-oss/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/mdaus/coda-oss/statuses/018f987341ded81d50301b535174b7739f91fb91"}}}}