{"action":"created","comment":{"url":"https://api.github.com/repos/stan-dev/math/pulls/comments/226764800","pull_request_review_id":166674439,"id":226764800,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjc2NDgwMA==","diff_hunk":"@@ -0,0 +1,52 @@\n+#include <stan/math/prim/scal.hpp>\n+#include <test/unit/util.hpp>\n+#include <gtest/gtest.h>\n+#include <limits>\n+\n+TEST(prob_transform, locscale) {\n+  EXPECT_FLOAT_EQ(2.0 - 5.0 * 1.0,\n+                  stan::math::locscale_constrain(-1.0, 2.0, 5.0));\n+\n+  EXPECT_FLOAT_EQ(1.7, stan::math::locscale_constrain(1.7, 0, 1));\n+}\n+TEST(prob_transform, locscale_j) {\n+  double lp = -17.0;\n+  double L = 2.0;\n+  double U = 5.0;\n+  double x = -1.0;\n+  EXPECT_FLOAT_EQ(L + U * x, stan::math::locscale_constrain(x, L, U, lp));\n+  EXPECT_FLOAT_EQ(-17.0 + log(U), lp);\n+\n+  double lp1 = -12.9;\n+  EXPECT_FLOAT_EQ(1.7, stan::math::locscale_constrain(1.7, 0, 1, lp1));\n+  EXPECT_FLOAT_EQ(-12.9, lp1);\n+}\n+TEST(ProbTransform, locscaleException) {","path":"test/unit/math/prim/scal/fun/locscale_transform_test.cpp","position":24,"original_position":24,"commit_id":"1e4a168fffd59daa806c85d2b78c5fb011784bf1","original_commit_id":"1e4a168fffd59daa806c85d2b78c5fb011784bf1","user":{"login":"VMatthijs","id":13718675,"node_id":"MDQ6VXNlcjEzNzE4Njc1","avatar_url":"https://avatars3.githubusercontent.com/u/13718675?v=4","gravatar_id":"","url":"https://api.github.com/users/VMatthijs","html_url":"https://github.com/VMatthijs","followers_url":"https://api.github.com/users/VMatthijs/followers","following_url":"https://api.github.com/users/VMatthijs/following{/other_user}","gists_url":"https://api.github.com/users/VMatthijs/gists{/gist_id}","starred_url":"https://api.github.com/users/VMatthijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VMatthijs/subscriptions","organizations_url":"https://api.github.com/users/VMatthijs/orgs","repos_url":"https://api.github.com/users/VMatthijs/repos","events_url":"https://api.github.com/users/VMatthijs/events{/privacy}","received_events_url":"https://api.github.com/users/VMatthijs/received_events","type":"User","site_admin":false},"body":"Also done.","created_at":"2018-10-19T19:56:42Z","updated_at":"2018-10-19T19:56:42Z","html_url":"https://github.com/stan-dev/math/pull/1048#discussion_r226764800","pull_request_url":"https://api.github.com/repos/stan-dev/math/pulls/1048","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/stan-dev/math/pulls/comments/226764800"},"html":{"href":"https://github.com/stan-dev/math/pull/1048#discussion_r226764800"},"pull_request":{"href":"https://api.github.com/repos/stan-dev/math/pulls/1048"}},"in_reply_to_id":226736528},"pull_request":{"url":"https://api.github.com/repos/stan-dev/math/pulls/1048","id":223035568,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzMDM1NTY4","html_url":"https://github.com/stan-dev/math/pull/1048","diff_url":"https://github.com/stan-dev/math/pull/1048.diff","patch_url":"https://github.com/stan-dev/math/pull/1048.patch","issue_url":"https://api.github.com/repos/stan-dev/math/issues/1048","number":1048,"state":"open","locked":false,"title":"Math library support for linear transformed unconstrained parameters","user":{"login":"VMatthijs","id":13718675,"node_id":"MDQ6VXNlcjEzNzE4Njc1","avatar_url":"https://avatars3.githubusercontent.com/u/13718675?v=4","gravatar_id":"","url":"https://api.github.com/users/VMatthijs","html_url":"https://github.com/VMatthijs","followers_url":"https://api.github.com/users/VMatthijs/followers","following_url":"https://api.github.com/users/VMatthijs/following{/other_user}","gists_url":"https://api.github.com/users/VMatthijs/gists{/gist_id}","starred_url":"https://api.github.com/users/VMatthijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VMatthijs/subscriptions","organizations_url":"https://api.github.com/users/VMatthijs/orgs","repos_url":"https://api.github.com/users/VMatthijs/repos","events_url":"https://api.github.com/users/VMatthijs/events{/privacy}","received_events_url":"https://api.github.com/users/VMatthijs/received_events","type":"User","site_admin":false},"body":"This is the Math library part of a solution to the issue:\r\nhttps://github.com/stan-dev/stan/issues/2656 .\r\n\r\n## Tests\r\n\r\nDescribe the new tests with the pull request.\r\n\r\nFor bug fixes there should be a new test that would fail if the patch weren't in place (so that the bug could be caught if it comes up again).\r\n\r\nFor new features there should be at least one test showing the expected behavior and one test that demonstrates error handling. Be aware the reviewer will very likely ask for more tests than this, but it's a start.\r\n\r\n## Side Effects\r\n\r\nFixes type errors in lower/upper bound constrain functions.\r\n\r\n## Checklist\r\n\r\n- [x] Math issue #(issue number)\r\n\r\n- [x] Copyright holder: Columbia University\r\n\r\n    The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:\r\n      - Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)\r\n      - Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)\r\n\r\n- [x] the basic tests are passing\r\n\r\n    - unit tests pass (to run, use: `./runTests.py test/unit`)\r\n    - header checks pass, (`make test-headers`)\r\n    - docs build, (`make doxygen`)\r\n    - code passes the built in [C++ standards](https://github.com/stan-dev/stan/wiki/Code-Quality) checks (`make cpplint`)\r\n\r\n- [x] the code is written in idiomatic C++ and changes are documented in the doxygen\r\n\r\n- [x] the new changes are tested\r\n","created_at":"2018-10-15T20:38:29Z","updated_at":"2018-10-19T19:56:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"96fe0b66f6ccfe7256cb750edd3bee54d9d8be94","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":233078045,"node_id":"MDU6TGFiZWwyMzMwNzgwNDU=","url":"https://api.github.com/repos/stan-dev/math/labels/feature","name":"feature","color":"bfd4f2","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/stan-dev/math/pulls/1048/commits","review_comments_url":"https://api.github.com/repos/stan-dev/math/pulls/1048/comments","review_comment_url":"https://api.github.com/repos/stan-dev/math/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stan-dev/math/issues/1048/comments","statuses_url":"https://api.github.com/repos/stan-dev/math/statuses/1e4a168fffd59daa806c85d2b78c5fb011784bf1","head":{"label":"VMatthijs:linearly_rescaled_constraint_parameters","ref":"linearly_rescaled_constraint_parameters","sha":"1e4a168fffd59daa806c85d2b78c5fb011784bf1","user":{"login":"VMatthijs","id":13718675,"node_id":"MDQ6VXNlcjEzNzE4Njc1","avatar_url":"https://avatars3.githubusercontent.com/u/13718675?v=4","gravatar_id":"","url":"https://api.github.com/users/VMatthijs","html_url":"https://github.com/VMatthijs","followers_url":"https://api.github.com/users/VMatthijs/followers","following_url":"https://api.github.com/users/VMatthijs/following{/other_user}","gists_url":"https://api.github.com/users/VMatthijs/gists{/gist_id}","starred_url":"https://api.github.com/users/VMatthijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VMatthijs/subscriptions","organizations_url":"https://api.github.com/users/VMatthijs/orgs","repos_url":"https://api.github.com/users/VMatthijs/repos","events_url":"https://api.github.com/users/VMatthijs/events{/privacy}","received_events_url":"https://api.github.com/users/VMatthijs/received_events","type":"User","site_admin":false},"repo":{"id":101224552,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEyMjQ1NTI=","name":"math","full_name":"VMatthijs/math","private":false,"owner":{"login":"VMatthijs","id":13718675,"node_id":"MDQ6VXNlcjEzNzE4Njc1","avatar_url":"https://avatars3.githubusercontent.com/u/13718675?v=4","gravatar_id":"","url":"https://api.github.com/users/VMatthijs","html_url":"https://github.com/VMatthijs","followers_url":"https://api.github.com/users/VMatthijs/followers","following_url":"https://api.github.com/users/VMatthijs/following{/other_user}","gists_url":"https://api.github.com/users/VMatthijs/gists{/gist_id}","starred_url":"https://api.github.com/users/VMatthijs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VMatthijs/subscriptions","organizations_url":"https://api.github.com/users/VMatthijs/orgs","repos_url":"https://api.github.com/users/VMatthijs/repos","events_url":"https://api.github.com/users/VMatthijs/events{/privacy}","received_events_url":"https://api.github.com/users/VMatthijs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/VMatthijs/math","description":"Stan Math Library","fork":true,"url":"https://api.github.com/repos/VMatthijs/math","forks_url":"https://api.github.com/repos/VMatthijs/math/forks","keys_url":"https://api.github.com/repos/VMatthijs/math/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VMatthijs/math/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VMatthijs/math/teams","hooks_url":"https://api.github.com/repos/VMatthijs/math/hooks","issue_events_url":"https://api.github.com/repos/VMatthijs/math/issues/events{/number}","events_url":"https://api.github.com/repos/VMatthijs/math/events","assignees_url":"https://api.github.com/repos/VMatthijs/math/assignees{/user}","branches_url":"https://api.github.com/repos/VMatthijs/math/branches{/branch}","tags_url":"https://api.github.com/repos/VMatthijs/math/tags","blobs_url":"https://api.github.com/repos/VMatthijs/math/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VMatthijs/math/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VMatthijs/math/git/refs{/sha}","trees_url":"https://api.github.com/repos/VMatthijs/math/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VMatthijs/math/statuses/{sha}","languages_url":"https://api.github.com/repos/VMatthijs/math/languages","stargazers_url":"https://api.github.com/repos/VMatthijs/math/stargazers","contributors_url":"https://api.github.com/repos/VMatthijs/math/contributors","subscribers_url":"https://api.github.com/repos/VMatthijs/math/subscribers","subscription_url":"https://api.github.com/repos/VMatthijs/math/subscription","commits_url":"https://api.github.com/repos/VMatthijs/math/commits{/sha}","git_commits_url":"https://api.github.com/repos/VMatthijs/math/git/commits{/sha}","comments_url":"https://api.github.com/repos/VMatthijs/math/comments{/number}","issue_comment_url":"https://api.github.com/repos/VMatthijs/math/issues/comments{/number}","contents_url":"https://api.github.com/repos/VMatthijs/math/contents/{+path}","compare_url":"https://api.github.com/repos/VMatthijs/math/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VMatthijs/math/merges","archive_url":"https://api.github.com/repos/VMatthijs/math/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VMatthijs/math/downloads","issues_url":"https://api.github.com/repos/VMatthijs/math/issues{/number}","pulls_url":"https://api.github.com/repos/VMatthijs/math/pulls{/number}","milestones_url":"https://api.github.com/repos/VMatthijs/math/milestones{/number}","notifications_url":"https://api.github.com/repos/VMatthijs/math/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VMatthijs/math/labels{/name}","releases_url":"https://api.github.com/repos/VMatthijs/math/releases{/id}","deployments_url":"https://api.github.com/repos/VMatthijs/math/deployments","created_at":"2017-08-23T20:59:46Z","updated_at":"2017-08-23T21:00:26Z","pushed_at":"2018-10-18T19:44:26Z","git_url":"git://github.com/VMatthijs/math.git","ssh_url":"git@github.com:VMatthijs/math.git","clone_url":"https://github.com/VMatthijs/math.git","svn_url":"https://github.com/VMatthijs/math","homepage":null,"size":338543,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"stan-dev:develop","ref":"develop","sha":"f01df88e109ee663fe9f829a96a7f516d40f27fe","user":{"login":"stan-dev","id":3374820,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzQ4MjA=","avatar_url":"https://avatars2.githubusercontent.com/u/3374820?v=4","gravatar_id":"","url":"https://api.github.com/users/stan-dev","html_url":"https://github.com/stan-dev","followers_url":"https://api.github.com/users/stan-dev/followers","following_url":"https://api.github.com/users/stan-dev/following{/other_user}","gists_url":"https://api.github.com/users/stan-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-dev/subscriptions","organizations_url":"https://api.github.com/users/stan-dev/orgs","repos_url":"https://api.github.com/users/stan-dev/repos","events_url":"https://api.github.com/users/stan-dev/events{/privacy}","received_events_url":"https://api.github.com/users/stan-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":38388440,"node_id":"MDEwOlJlcG9zaXRvcnkzODM4ODQ0MA==","name":"math","full_name":"stan-dev/math","private":false,"owner":{"login":"stan-dev","id":3374820,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzNzQ4MjA=","avatar_url":"https://avatars2.githubusercontent.com/u/3374820?v=4","gravatar_id":"","url":"https://api.github.com/users/stan-dev","html_url":"https://github.com/stan-dev","followers_url":"https://api.github.com/users/stan-dev/followers","following_url":"https://api.github.com/users/stan-dev/following{/other_user}","gists_url":"https://api.github.com/users/stan-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/stan-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stan-dev/subscriptions","organizations_url":"https://api.github.com/users/stan-dev/orgs","repos_url":"https://api.github.com/users/stan-dev/repos","events_url":"https://api.github.com/users/stan-dev/events{/privacy}","received_events_url":"https://api.github.com/users/stan-dev/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/stan-dev/math","description":"Stan Math Library","fork":false,"url":"https://api.github.com/repos/stan-dev/math","forks_url":"https://api.github.com/repos/stan-dev/math/forks","keys_url":"https://api.github.com/repos/stan-dev/math/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stan-dev/math/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stan-dev/math/teams","hooks_url":"https://api.github.com/repos/stan-dev/math/hooks","issue_events_url":"https://api.github.com/repos/stan-dev/math/issues/events{/number}","events_url":"https://api.github.com/repos/stan-dev/math/events","assignees_url":"https://api.github.com/repos/stan-dev/math/assignees{/user}","branches_url":"https://api.github.com/repos/stan-dev/math/branches{/branch}","tags_url":"https://api.github.com/repos/stan-dev/math/tags","blobs_url":"https://api.github.com/repos/stan-dev/math/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stan-dev/math/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stan-dev/math/git/refs{/sha}","trees_url":"https://api.github.com/repos/stan-dev/math/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stan-dev/math/statuses/{sha}","languages_url":"https://api.github.com/repos/stan-dev/math/languages","stargazers_url":"https://api.github.com/repos/stan-dev/math/stargazers","contributors_url":"https://api.github.com/repos/stan-dev/math/contributors","subscribers_url":"https://api.github.com/repos/stan-dev/math/subscribers","subscription_url":"https://api.github.com/repos/stan-dev/math/subscription","commits_url":"https://api.github.com/repos/stan-dev/math/commits{/sha}","git_commits_url":"https://api.github.com/repos/stan-dev/math/git/commits{/sha}","comments_url":"https://api.github.com/repos/stan-dev/math/comments{/number}","issue_comment_url":"https://api.github.com/repos/stan-dev/math/issues/comments{/number}","contents_url":"https://api.github.com/repos/stan-dev/math/contents/{+path}","compare_url":"https://api.github.com/repos/stan-dev/math/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stan-dev/math/merges","archive_url":"https://api.github.com/repos/stan-dev/math/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stan-dev/math/downloads","issues_url":"https://api.github.com/repos/stan-dev/math/issues{/number}","pulls_url":"https://api.github.com/repos/stan-dev/math/pulls{/number}","milestones_url":"https://api.github.com/repos/stan-dev/math/milestones{/number}","notifications_url":"https://api.github.com/repos/stan-dev/math/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stan-dev/math/labels{/name}","releases_url":"https://api.github.com/repos/stan-dev/math/releases{/id}","deployments_url":"https://api.github.com/repos/stan-dev/math/deployments","created_at":"2015-07-01T18:40:54Z","updated_at":"2018-10-18T01:04:34Z","pushed_at":"2018-10-19T18:45:04Z","git_url":"git://github.com/stan-dev/math.git","ssh_url":"git@github.com:stan-dev/math.git","clone_url":"https://github.com/stan-dev/math.git","svn_url":"https://github.com/stan-dev/math","homepage":null,"size":261910,"stargazers_count":239,"watchers_count":239,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":81,"mirror_url":null,"archived":false,"open_issues_count":216,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":81,"open_issues":216,"watchers":239,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/stan-dev/math/pulls/1048"},"html":{"href":"https://github.com/stan-dev/math/pull/1048"},"issue":{"href":"https://api.github.com/repos/stan-dev/math/issues/1048"},"comments":{"href":"https://api.github.com/repos/stan-dev/math/issues/1048/comments"},"review_comments":{"href":"https://api.github.com/repos/stan-dev/math/pulls/1048/comments"},"review_comment":{"href":"https://api.github.com/repos/stan-dev/math/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stan-dev/math/pulls/1048/commits"},"statuses":{"href":"https://api.github.com/repos/stan-dev/math/statuses/1e4a168fffd59daa806c85d2b78c5fb011784bf1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"VMatthijs"}}