{"action":"created","comment":{"url":"https://api.github.com/repos/Wangscape/Wangscape/pulls/comments/94338085","pull_request_review_id":14860741,"id":94338085,"diff_hunk":"@@ -7,10 +7,15 @@\n #include <boost/filesystem.hpp>\n #include <boost/iterator/zip_iterator.hpp>\n #include <boost/range.hpp>\n-#include \"common.h\"\n+#include \"../common.h\"","path":"Wangscape/tilegen/TilesetGenerator.cpp","position":11,"original_position":11,"commit_id":"a26a0cd923405a79db4e2e94af7f31eb211b3892","original_commit_id":"a26a0cd923405a79db4e2e94af7f31eb211b3892","user":{"login":"hryniuk","id":344521,"avatar_url":"https://avatars.githubusercontent.com/u/344521?v=3","gravatar_id":"","url":"https://api.github.com/users/hryniuk","html_url":"https://github.com/hryniuk","followers_url":"https://api.github.com/users/hryniuk/followers","following_url":"https://api.github.com/users/hryniuk/following{/other_user}","gists_url":"https://api.github.com/users/hryniuk/gists{/gist_id}","starred_url":"https://api.github.com/users/hryniuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hryniuk/subscriptions","organizations_url":"https://api.github.com/users/hryniuk/orgs","repos_url":"https://api.github.com/users/hryniuk/repos","events_url":"https://api.github.com/users/hryniuk/events{/privacy}","received_events_url":"https://api.github.com/users/hryniuk/received_events","type":"User","site_admin":false},"body":"`\"tilegen/common.h\"`","created_at":"2017-01-02T18:26:21Z","updated_at":"2017-01-02T18:37:47Z","html_url":"https://github.com/Wangscape/Wangscape/pull/50#discussion_r94338085","pull_request_url":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/Wangscape/Wangscape/pulls/comments/94338085"},"html":{"href":"https://github.com/Wangscape/Wangscape/pull/50#discussion_r94338085"},"pull_request":{"href":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50","id":99813900,"html_url":"https://github.com/Wangscape/Wangscape/pull/50","diff_url":"https://github.com/Wangscape/Wangscape/pull/50.diff","patch_url":"https://github.com/Wangscape/Wangscape/pull/50.patch","issue_url":"https://api.github.com/repos/Wangscape/Wangscape/issues/50","number":50,"state":"open","locked":false,"title":"Perlin 2","user":{"login":"serin-delaunay","id":15715657,"avatar_url":"https://avatars.githubusercontent.com/u/15715657?v=3","gravatar_id":"","url":"https://api.github.com/users/serin-delaunay","html_url":"https://github.com/serin-delaunay","followers_url":"https://api.github.com/users/serin-delaunay/followers","following_url":"https://api.github.com/users/serin-delaunay/following{/other_user}","gists_url":"https://api.github.com/users/serin-delaunay/gists{/gist_id}","starred_url":"https://api.github.com/users/serin-delaunay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serin-delaunay/subscriptions","organizations_url":"https://api.github.com/users/serin-delaunay/orgs","repos_url":"https://api.github.com/users/serin-delaunay/repos","events_url":"https://api.github.com/users/serin-delaunay/events{/privacy}","received_events_url":"https://api.github.com/users/serin-delaunay/received_events","type":"User","site_admin":false},"body":"Transferring the main repository to the organisation account seems to have broken my ability to add commits to https://github.com/Wangscape/Wangscape/pull/40. I've no idea how to fix that, and it wasn't ready to merge so I'm making a new PR.\r\n\r\n#39 is unresolved. This PR is already very large and resolving it will require even more structural changes. It's probably better to do it in a separate PR, after this is merged.\r\n\r\nChanges still required (https://github.com/Wangscape/Wangscape/pull/40#pullrequestreview-14364296):\r\n- [x] Refactor `AlphaCalculator`:\r\n  - [x] Pass and return values in a more sensible way.\r\n  - [x] Extract corner-independent operations and preconditions on weights (raising to a power, setting a lower bound, zeroing alpha values).\r\n  - [x] Calculate `total_weight` with `std::accumulate`.\r\n  - [x] Prevent float overflow when `total_weight` is very small.\r\n  - [x] Rename `AlphaVector`, `WeightVector`, etc.\r\n  - [x] Simplify `AlphaCalculator`; when implementing https://github.com/Wangscape/Wangscape/issues/37 it will need to be a class hierarchy for the sake of composability, but with the other changes, only calculatePixelAlphaLinear and calculatePixelAlphaMax will need to be preserved.\r\n- [x] Some constructors and destructors probably still need to be `default` and `virtual`.\r\n- [x] Many constructors should be marked `explicit`.\r\n- [x] Try to split `TilePartitionerPerlin::makePartition` more.\r\n- [x] Try to fix `TestTilesetGenerator::TestGenerateClique`, or remove it.\r\n- [x] Fix the two failing tests in `TestMovingScaleBias`.\r\n- [x] More of the source should be divided into folders. ~I think that's an issue for another PR, though.~\r\n- [ ] `makeReseedable` should eventually be made generic using  SFINAE, but it will require a change of compiler for me (and I don't think it's urgent). Probably an issue for another PR.\r\n- [ ] Resolve merge conflicts.","created_at":"2016-12-31T22:47:56Z","updated_at":"2017-01-02T18:37:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"hryniuk","id":344521,"avatar_url":"https://avatars.githubusercontent.com/u/344521?v=3","gravatar_id":"","url":"https://api.github.com/users/hryniuk","html_url":"https://github.com/hryniuk","followers_url":"https://api.github.com/users/hryniuk/followers","following_url":"https://api.github.com/users/hryniuk/following{/other_user}","gists_url":"https://api.github.com/users/hryniuk/gists{/gist_id}","starred_url":"https://api.github.com/users/hryniuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hryniuk/subscriptions","organizations_url":"https://api.github.com/users/hryniuk/orgs","repos_url":"https://api.github.com/users/hryniuk/repos","events_url":"https://api.github.com/users/hryniuk/events{/privacy}","received_events_url":"https://api.github.com/users/hryniuk/received_events","type":"User","site_admin":false},"assignees":[{"login":"hryniuk","id":344521,"avatar_url":"https://avatars.githubusercontent.com/u/344521?v=3","gravatar_id":"","url":"https://api.github.com/users/hryniuk","html_url":"https://github.com/hryniuk","followers_url":"https://api.github.com/users/hryniuk/followers","following_url":"https://api.github.com/users/hryniuk/following{/other_user}","gists_url":"https://api.github.com/users/hryniuk/gists{/gist_id}","starred_url":"https://api.github.com/users/hryniuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hryniuk/subscriptions","organizations_url":"https://api.github.com/users/hryniuk/orgs","repos_url":"https://api.github.com/users/hryniuk/repos","events_url":"https://api.github.com/users/hryniuk/events{/privacy}","received_events_url":"https://api.github.com/users/hryniuk/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50/commits","review_comments_url":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50/comments","review_comment_url":"https://api.github.com/repos/Wangscape/Wangscape/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wangscape/Wangscape/issues/50/comments","statuses_url":"https://api.github.com/repos/Wangscape/Wangscape/statuses/a26a0cd923405a79db4e2e94af7f31eb211b3892","head":{"label":"serin-delaunay:perlin","ref":"perlin","sha":"a26a0cd923405a79db4e2e94af7f31eb211b3892","user":{"login":"serin-delaunay","id":15715657,"avatar_url":"https://avatars.githubusercontent.com/u/15715657?v=3","gravatar_id":"","url":"https://api.github.com/users/serin-delaunay","html_url":"https://github.com/serin-delaunay","followers_url":"https://api.github.com/users/serin-delaunay/followers","following_url":"https://api.github.com/users/serin-delaunay/following{/other_user}","gists_url":"https://api.github.com/users/serin-delaunay/gists{/gist_id}","starred_url":"https://api.github.com/users/serin-delaunay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serin-delaunay/subscriptions","organizations_url":"https://api.github.com/users/serin-delaunay/orgs","repos_url":"https://api.github.com/users/serin-delaunay/repos","events_url":"https://api.github.com/users/serin-delaunay/events{/privacy}","received_events_url":"https://api.github.com/users/serin-delaunay/received_events","type":"User","site_admin":false},"repo":{"id":77727897,"name":"Wangscape","full_name":"serin-delaunay/Wangscape","owner":{"login":"serin-delaunay","id":15715657,"avatar_url":"https://avatars.githubusercontent.com/u/15715657?v=3","gravatar_id":"","url":"https://api.github.com/users/serin-delaunay","html_url":"https://github.com/serin-delaunay","followers_url":"https://api.github.com/users/serin-delaunay/followers","following_url":"https://api.github.com/users/serin-delaunay/following{/other_user}","gists_url":"https://api.github.com/users/serin-delaunay/gists{/gist_id}","starred_url":"https://api.github.com/users/serin-delaunay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/serin-delaunay/subscriptions","organizations_url":"https://api.github.com/users/serin-delaunay/orgs","repos_url":"https://api.github.com/users/serin-delaunay/repos","events_url":"https://api.github.com/users/serin-delaunay/events{/privacy}","received_events_url":"https://api.github.com/users/serin-delaunay/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/serin-delaunay/Wangscape","description":"Convert terrain tiles to procedural corner Wang tilesets","fork":true,"url":"https://api.github.com/repos/serin-delaunay/Wangscape","forks_url":"https://api.github.com/repos/serin-delaunay/Wangscape/forks","keys_url":"https://api.github.com/repos/serin-delaunay/Wangscape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/serin-delaunay/Wangscape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/serin-delaunay/Wangscape/teams","hooks_url":"https://api.github.com/repos/serin-delaunay/Wangscape/hooks","issue_events_url":"https://api.github.com/repos/serin-delaunay/Wangscape/issues/events{/number}","events_url":"https://api.github.com/repos/serin-delaunay/Wangscape/events","assignees_url":"https://api.github.com/repos/serin-delaunay/Wangscape/assignees{/user}","branches_url":"https://api.github.com/repos/serin-delaunay/Wangscape/branches{/branch}","tags_url":"https://api.github.com/repos/serin-delaunay/Wangscape/tags","blobs_url":"https://api.github.com/repos/serin-delaunay/Wangscape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/serin-delaunay/Wangscape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/serin-delaunay/Wangscape/git/refs{/sha}","trees_url":"https://api.github.com/repos/serin-delaunay/Wangscape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/serin-delaunay/Wangscape/statuses/{sha}","languages_url":"https://api.github.com/repos/serin-delaunay/Wangscape/languages","stargazers_url":"https://api.github.com/repos/serin-delaunay/Wangscape/stargazers","contributors_url":"https://api.github.com/repos/serin-delaunay/Wangscape/contributors","subscribers_url":"https://api.github.com/repos/serin-delaunay/Wangscape/subscribers","subscription_url":"https://api.github.com/repos/serin-delaunay/Wangscape/subscription","commits_url":"https://api.github.com/repos/serin-delaunay/Wangscape/commits{/sha}","git_commits_url":"https://api.github.com/repos/serin-delaunay/Wangscape/git/commits{/sha}","comments_url":"https://api.github.com/repos/serin-delaunay/Wangscape/comments{/number}","issue_comment_url":"https://api.github.com/repos/serin-delaunay/Wangscape/issues/comments{/number}","contents_url":"https://api.github.com/repos/serin-delaunay/Wangscape/contents/{+path}","compare_url":"https://api.github.com/repos/serin-delaunay/Wangscape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/serin-delaunay/Wangscape/merges","archive_url":"https://api.github.com/repos/serin-delaunay/Wangscape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/serin-delaunay/Wangscape/downloads","issues_url":"https://api.github.com/repos/serin-delaunay/Wangscape/issues{/number}","pulls_url":"https://api.github.com/repos/serin-delaunay/Wangscape/pulls{/number}","milestones_url":"https://api.github.com/repos/serin-delaunay/Wangscape/milestones{/number}","notifications_url":"https://api.github.com/repos/serin-delaunay/Wangscape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/serin-delaunay/Wangscape/labels{/name}","releases_url":"https://api.github.com/repos/serin-delaunay/Wangscape/releases{/id}","deployments_url":"https://api.github.com/repos/serin-delaunay/Wangscape/deployments","created_at":"2016-12-31T06:09:42Z","updated_at":"2016-12-31T06:09:44Z","pushed_at":"2017-01-01T05:35:58Z","git_url":"git://github.com/serin-delaunay/Wangscape.git","ssh_url":"git@github.com:serin-delaunay/Wangscape.git","clone_url":"https://github.com/serin-delaunay/Wangscape.git","svn_url":"https://github.com/serin-delaunay/Wangscape","homepage":null,"size":395,"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":"master"}},"base":{"label":"Wangscape:master","ref":"master","sha":"606c59c4618115c1a084399013c6020388e99799","user":{"login":"Wangscape","id":24831168,"avatar_url":"https://avatars.githubusercontent.com/u/24831168?v=3","gravatar_id":"","url":"https://api.github.com/users/Wangscape","html_url":"https://github.com/Wangscape","followers_url":"https://api.github.com/users/Wangscape/followers","following_url":"https://api.github.com/users/Wangscape/following{/other_user}","gists_url":"https://api.github.com/users/Wangscape/gists{/gist_id}","starred_url":"https://api.github.com/users/Wangscape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wangscape/subscriptions","organizations_url":"https://api.github.com/users/Wangscape/orgs","repos_url":"https://api.github.com/users/Wangscape/repos","events_url":"https://api.github.com/users/Wangscape/events{/privacy}","received_events_url":"https://api.github.com/users/Wangscape/received_events","type":"Organization","site_admin":false},"repo":{"id":73145321,"name":"Wangscape","full_name":"Wangscape/Wangscape","owner":{"login":"Wangscape","id":24831168,"avatar_url":"https://avatars.githubusercontent.com/u/24831168?v=3","gravatar_id":"","url":"https://api.github.com/users/Wangscape","html_url":"https://github.com/Wangscape","followers_url":"https://api.github.com/users/Wangscape/followers","following_url":"https://api.github.com/users/Wangscape/following{/other_user}","gists_url":"https://api.github.com/users/Wangscape/gists{/gist_id}","starred_url":"https://api.github.com/users/Wangscape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wangscape/subscriptions","organizations_url":"https://api.github.com/users/Wangscape/orgs","repos_url":"https://api.github.com/users/Wangscape/repos","events_url":"https://api.github.com/users/Wangscape/events{/privacy}","received_events_url":"https://api.github.com/users/Wangscape/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wangscape/Wangscape","description":"Convert terrain tiles to procedural corner Wang tilesets","fork":false,"url":"https://api.github.com/repos/Wangscape/Wangscape","forks_url":"https://api.github.com/repos/Wangscape/Wangscape/forks","keys_url":"https://api.github.com/repos/Wangscape/Wangscape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wangscape/Wangscape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wangscape/Wangscape/teams","hooks_url":"https://api.github.com/repos/Wangscape/Wangscape/hooks","issue_events_url":"https://api.github.com/repos/Wangscape/Wangscape/issues/events{/number}","events_url":"https://api.github.com/repos/Wangscape/Wangscape/events","assignees_url":"https://api.github.com/repos/Wangscape/Wangscape/assignees{/user}","branches_url":"https://api.github.com/repos/Wangscape/Wangscape/branches{/branch}","tags_url":"https://api.github.com/repos/Wangscape/Wangscape/tags","blobs_url":"https://api.github.com/repos/Wangscape/Wangscape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wangscape/Wangscape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wangscape/Wangscape/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wangscape/Wangscape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wangscape/Wangscape/statuses/{sha}","languages_url":"https://api.github.com/repos/Wangscape/Wangscape/languages","stargazers_url":"https://api.github.com/repos/Wangscape/Wangscape/stargazers","contributors_url":"https://api.github.com/repos/Wangscape/Wangscape/contributors","subscribers_url":"https://api.github.com/repos/Wangscape/Wangscape/subscribers","subscription_url":"https://api.github.com/repos/Wangscape/Wangscape/subscription","commits_url":"https://api.github.com/repos/Wangscape/Wangscape/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wangscape/Wangscape/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wangscape/Wangscape/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wangscape/Wangscape/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wangscape/Wangscape/contents/{+path}","compare_url":"https://api.github.com/repos/Wangscape/Wangscape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wangscape/Wangscape/merges","archive_url":"https://api.github.com/repos/Wangscape/Wangscape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wangscape/Wangscape/downloads","issues_url":"https://api.github.com/repos/Wangscape/Wangscape/issues{/number}","pulls_url":"https://api.github.com/repos/Wangscape/Wangscape/pulls{/number}","milestones_url":"https://api.github.com/repos/Wangscape/Wangscape/milestones{/number}","notifications_url":"https://api.github.com/repos/Wangscape/Wangscape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wangscape/Wangscape/labels{/name}","releases_url":"https://api.github.com/repos/Wangscape/Wangscape/releases{/id}","deployments_url":"https://api.github.com/repos/Wangscape/Wangscape/deployments","created_at":"2016-11-08T03:28:11Z","updated_at":"2016-12-30T03:18:34Z","pushed_at":"2017-01-01T05:36:00Z","git_url":"git://github.com/Wangscape/Wangscape.git","ssh_url":"git@github.com:Wangscape/Wangscape.git","clone_url":"https://github.com/Wangscape/Wangscape.git","svn_url":"https://github.com/Wangscape/Wangscape","homepage":null,"size":325,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":23,"forks":2,"open_issues":23,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50"},"html":{"href":"https://github.com/Wangscape/Wangscape/pull/50"},"issue":{"href":"https://api.github.com/repos/Wangscape/Wangscape/issues/50"},"comments":{"href":"https://api.github.com/repos/Wangscape/Wangscape/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/Wangscape/Wangscape/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wangscape/Wangscape/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/Wangscape/Wangscape/statuses/a26a0cd923405a79db4e2e94af7f31eb211b3892"}}}}
{"actor":{"display_login":"hryniuk"}}