{"action":"created","comment":{"url":"https://api.github.com/repos/cogneco/ooc-kean/pulls/comments/38413105","id":38413105,"diff_hunk":"@@ -0,0 +1,120 @@\n+/*\n+* Copyright (C) 2014 - Simon Mika <simon@mika.se>\n+*\n+* This sofware is free software; you can redistribute it and/or\n+* modify it under the terms of the GNU Lesser General Public\n+* License as published by the Free Software Foundation; either\n+* version 2.1 of the License, or (at your option) any later version.\n+*\n+* This software is distributed in the hope that it will be useful,\n+* but WITHOUT ANY WARRANTY; without even the implied warranty of\n+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+* Lesser General Public License for more details.\n+*\n+* You should have received a copy of the GNU Lesser General Public License\n+* along with this software. If not, see <http://www.gnu.org/licenses/>.\n+*/\n+use ooc-collections\n+import math\n+import FloatVectorList\n+\n+BoolVectorList: class extends VectorList<Bool> {\n+\tinit: func ~default {\n+\t\tthis super()\n+\t}\n+\tinit: func ~heap (capacity: Int) {\n+\t\tsuper(capacity)\n+\t}\n+\tinit: func ~fromVectorList (other: VectorList<Bool>) {\n+\t\tthis super(other _vector)\n+\t\tthis _count = other count\n+\t}\n+\ttally: func (tallyTrues: Bool) -> Int {\n+\t\ttrues := 0\n+\t\tfor (i in 0 .. this count)\n+\t\t\ttrues += (this[i] ? 1 : 0)\n+\t\ttallyTrues ? trues : this _count - trues\n+\t}\n+\toperator [] <T> (index: Int) -> T {\n+\t\tthis as VectorList<Bool> _vector[index]\n+\t}\n+\toperator []= (index: Int, item: Bool) {\n+\t\tthis _vector[index] = item\n+\t}\n+\t/*operator && (other: This) -> This {\n+\t\tminimumCount := this count < other count ? this count : other count\n+\t\tresult := This new(minimumCount)\n+\t\tfor (i in 0 .. minimumCount)\n+\t\t\tresult add(this[i] && other[i])\n+\t\tresult\n+\t}\n+\toperator || (other: This) -> This {\n+\t\tminimumCount := this count < other count ? this count : other count\n+\t\tresult := This new(minimumCount)\n+\t\tfor (i in 0 .. minimumCount)\n+\t\t\tresult add(this[i] || other[i])\n+\t\tresult\n+\t}*/\n+\treverse: func -> This {\n+\t\tresult := This new(this _count)\n+\t\tfor (i in 1 .. (this _count + 1))\n+\t\t\tresult add(this[this _count - i])\n+\t\tresult","path":"source/math/BoolVectorList.ooc","position":62,"original_position":62,"commit_id":"5b92a8ee3fcb5fc8baaaeda889e0d3db3b69ffa8","original_commit_id":"5b92a8ee3fcb5fc8baaaeda889e0d3db3b69ffa8","user":{"login":"bettinaselig","id":11610114,"avatar_url":"https://avatars.githubusercontent.com/u/11610114?v=3","gravatar_id":"","url":"https://api.github.com/users/bettinaselig","html_url":"https://github.com/bettinaselig","followers_url":"https://api.github.com/users/bettinaselig/followers","following_url":"https://api.github.com/users/bettinaselig/following{/other_user}","gists_url":"https://api.github.com/users/bettinaselig/gists{/gist_id}","starred_url":"https://api.github.com/users/bettinaselig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bettinaselig/subscriptions","organizations_url":"https://api.github.com/users/bettinaselig/orgs","repos_url":"https://api.github.com/users/bettinaselig/repos","events_url":"https://api.github.com/users/bettinaselig/events{/privacy}","received_events_url":"https://api.github.com/users/bettinaselig/received_events","type":"User","site_admin":false},"body":"Didn't we talk about this before? I wanted to know if you can call `VectorList reverse()` in `BoolVectorList reverse()` with `super()` or similar? Otherwise one needs to casts whenever you call `BoolVectorList reverse()`.","created_at":"2015-09-01T12:35:07Z","updated_at":"2015-09-01T12:35:07Z","html_url":"https://github.com/cogneco/ooc-kean/pull/336#discussion_r38413105","pull_request_url":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336","_links":{"self":{"href":"https://api.github.com/repos/cogneco/ooc-kean/pulls/comments/38413105"},"html":{"href":"https://github.com/cogneco/ooc-kean/pull/336#discussion_r38413105"},"pull_request":{"href":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336"}}},"pull_request":{"url":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336","id":43267590,"html_url":"https://github.com/cogneco/ooc-kean/pull/336","diff_url":"https://github.com/cogneco/ooc-kean/pull/336.diff","patch_url":"https://github.com/cogneco/ooc-kean/pull/336.patch","issue_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/336","number":336,"state":"open","locked":false,"title":"Create BoolVectorList and extended FloatVectorList ans VectorList.","user":{"login":"bettinaselig","id":11610114,"avatar_url":"https://avatars.githubusercontent.com/u/11610114?v=3","gravatar_id":"","url":"https://api.github.com/users/bettinaselig","html_url":"https://github.com/bettinaselig","followers_url":"https://api.github.com/users/bettinaselig/followers","following_url":"https://api.github.com/users/bettinaselig/following{/other_user}","gists_url":"https://api.github.com/users/bettinaselig/gists{/gist_id}","starred_url":"https://api.github.com/users/bettinaselig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bettinaselig/subscriptions","organizations_url":"https://api.github.com/users/bettinaselig/orgs","repos_url":"https://api.github.com/users/bettinaselig/repos","events_url":"https://api.github.com/users/bettinaselig/events{/privacy}","received_events_url":"https://api.github.com/users/bettinaselig/received_events","type":"User","site_admin":false},"body":"Goes together with pull request in vidhance.","created_at":"2015-08-25T09:43:06Z","updated_at":"2015-09-01T12:35:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ad1001c2cc5244672baa87f2f6c714df9c4b2ae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336/commits","review_comments_url":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336/comments","review_comment_url":"https://api.github.com/repos/cogneco/ooc-kean/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/336/comments","statuses_url":"https://api.github.com/repos/cogneco/ooc-kean/statuses/5b92a8ee3fcb5fc8baaaeda889e0d3db3b69ffa8","head":{"label":"bettinaselig:master","ref":"master","sha":"5b92a8ee3fcb5fc8baaaeda889e0d3db3b69ffa8","user":{"login":"bettinaselig","id":11610114,"avatar_url":"https://avatars.githubusercontent.com/u/11610114?v=3","gravatar_id":"","url":"https://api.github.com/users/bettinaselig","html_url":"https://github.com/bettinaselig","followers_url":"https://api.github.com/users/bettinaselig/followers","following_url":"https://api.github.com/users/bettinaselig/following{/other_user}","gists_url":"https://api.github.com/users/bettinaselig/gists{/gist_id}","starred_url":"https://api.github.com/users/bettinaselig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bettinaselig/subscriptions","organizations_url":"https://api.github.com/users/bettinaselig/orgs","repos_url":"https://api.github.com/users/bettinaselig/repos","events_url":"https://api.github.com/users/bettinaselig/events{/privacy}","received_events_url":"https://api.github.com/users/bettinaselig/received_events","type":"User","site_admin":false},"repo":{"id":32721509,"name":"ooc-kean","full_name":"bettinaselig/ooc-kean","owner":{"login":"bettinaselig","id":11610114,"avatar_url":"https://avatars.githubusercontent.com/u/11610114?v=3","gravatar_id":"","url":"https://api.github.com/users/bettinaselig","html_url":"https://github.com/bettinaselig","followers_url":"https://api.github.com/users/bettinaselig/followers","following_url":"https://api.github.com/users/bettinaselig/following{/other_user}","gists_url":"https://api.github.com/users/bettinaselig/gists{/gist_id}","starred_url":"https://api.github.com/users/bettinaselig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bettinaselig/subscriptions","organizations_url":"https://api.github.com/users/bettinaselig/orgs","repos_url":"https://api.github.com/users/bettinaselig/repos","events_url":"https://api.github.com/users/bettinaselig/events{/privacy}","received_events_url":"https://api.github.com/users/bettinaselig/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bettinaselig/ooc-kean","description":"ooc port of parts of Kean.","fork":true,"url":"https://api.github.com/repos/bettinaselig/ooc-kean","forks_url":"https://api.github.com/repos/bettinaselig/ooc-kean/forks","keys_url":"https://api.github.com/repos/bettinaselig/ooc-kean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bettinaselig/ooc-kean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bettinaselig/ooc-kean/teams","hooks_url":"https://api.github.com/repos/bettinaselig/ooc-kean/hooks","issue_events_url":"https://api.github.com/repos/bettinaselig/ooc-kean/issues/events{/number}","events_url":"https://api.github.com/repos/bettinaselig/ooc-kean/events","assignees_url":"https://api.github.com/repos/bettinaselig/ooc-kean/assignees{/user}","branches_url":"https://api.github.com/repos/bettinaselig/ooc-kean/branches{/branch}","tags_url":"https://api.github.com/repos/bettinaselig/ooc-kean/tags","blobs_url":"https://api.github.com/repos/bettinaselig/ooc-kean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bettinaselig/ooc-kean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bettinaselig/ooc-kean/git/refs{/sha}","trees_url":"https://api.github.com/repos/bettinaselig/ooc-kean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bettinaselig/ooc-kean/statuses/{sha}","languages_url":"https://api.github.com/repos/bettinaselig/ooc-kean/languages","stargazers_url":"https://api.github.com/repos/bettinaselig/ooc-kean/stargazers","contributors_url":"https://api.github.com/repos/bettinaselig/ooc-kean/contributors","subscribers_url":"https://api.github.com/repos/bettinaselig/ooc-kean/subscribers","subscription_url":"https://api.github.com/repos/bettinaselig/ooc-kean/subscription","commits_url":"https://api.github.com/repos/bettinaselig/ooc-kean/commits{/sha}","git_commits_url":"https://api.github.com/repos/bettinaselig/ooc-kean/git/commits{/sha}","comments_url":"https://api.github.com/repos/bettinaselig/ooc-kean/comments{/number}","issue_comment_url":"https://api.github.com/repos/bettinaselig/ooc-kean/issues/comments{/number}","contents_url":"https://api.github.com/repos/bettinaselig/ooc-kean/contents/{+path}","compare_url":"https://api.github.com/repos/bettinaselig/ooc-kean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bettinaselig/ooc-kean/merges","archive_url":"https://api.github.com/repos/bettinaselig/ooc-kean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bettinaselig/ooc-kean/downloads","issues_url":"https://api.github.com/repos/bettinaselig/ooc-kean/issues{/number}","pulls_url":"https://api.github.com/repos/bettinaselig/ooc-kean/pulls{/number}","milestones_url":"https://api.github.com/repos/bettinaselig/ooc-kean/milestones{/number}","notifications_url":"https://api.github.com/repos/bettinaselig/ooc-kean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bettinaselig/ooc-kean/labels{/name}","releases_url":"https://api.github.com/repos/bettinaselig/ooc-kean/releases{/id}","created_at":"2015-03-23T09:10:28Z","updated_at":"2015-05-05T07:05:58Z","pushed_at":"2015-09-01T11:40:49Z","git_url":"git://github.com/bettinaselig/ooc-kean.git","ssh_url":"git@github.com:bettinaselig/ooc-kean.git","clone_url":"https://github.com/bettinaselig/ooc-kean.git","svn_url":"https://github.com/bettinaselig/ooc-kean","homepage":"","size":7003,"stargazers_count":0,"watchers_count":0,"language":"ooc","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":"cogneco:master","ref":"master","sha":"769fe066f6596238e488a0f63310d75a93852606","user":{"login":"cogneco","id":3601419,"avatar_url":"https://avatars.githubusercontent.com/u/3601419?v=3","gravatar_id":"","url":"https://api.github.com/users/cogneco","html_url":"https://github.com/cogneco","followers_url":"https://api.github.com/users/cogneco/followers","following_url":"https://api.github.com/users/cogneco/following{/other_user}","gists_url":"https://api.github.com/users/cogneco/gists{/gist_id}","starred_url":"https://api.github.com/users/cogneco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogneco/subscriptions","organizations_url":"https://api.github.com/users/cogneco/orgs","repos_url":"https://api.github.com/users/cogneco/repos","events_url":"https://api.github.com/users/cogneco/events{/privacy}","received_events_url":"https://api.github.com/users/cogneco/received_events","type":"Organization","site_admin":false},"repo":{"id":25256330,"name":"ooc-kean","full_name":"cogneco/ooc-kean","owner":{"login":"cogneco","id":3601419,"avatar_url":"https://avatars.githubusercontent.com/u/3601419?v=3","gravatar_id":"","url":"https://api.github.com/users/cogneco","html_url":"https://github.com/cogneco","followers_url":"https://api.github.com/users/cogneco/followers","following_url":"https://api.github.com/users/cogneco/following{/other_user}","gists_url":"https://api.github.com/users/cogneco/gists{/gist_id}","starred_url":"https://api.github.com/users/cogneco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogneco/subscriptions","organizations_url":"https://api.github.com/users/cogneco/orgs","repos_url":"https://api.github.com/users/cogneco/repos","events_url":"https://api.github.com/users/cogneco/events{/privacy}","received_events_url":"https://api.github.com/users/cogneco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cogneco/ooc-kean","description":"ooc port of parts of Kean.","fork":false,"url":"https://api.github.com/repos/cogneco/ooc-kean","forks_url":"https://api.github.com/repos/cogneco/ooc-kean/forks","keys_url":"https://api.github.com/repos/cogneco/ooc-kean/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cogneco/ooc-kean/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cogneco/ooc-kean/teams","hooks_url":"https://api.github.com/repos/cogneco/ooc-kean/hooks","issue_events_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/events{/number}","events_url":"https://api.github.com/repos/cogneco/ooc-kean/events","assignees_url":"https://api.github.com/repos/cogneco/ooc-kean/assignees{/user}","branches_url":"https://api.github.com/repos/cogneco/ooc-kean/branches{/branch}","tags_url":"https://api.github.com/repos/cogneco/ooc-kean/tags","blobs_url":"https://api.github.com/repos/cogneco/ooc-kean/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cogneco/ooc-kean/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cogneco/ooc-kean/git/refs{/sha}","trees_url":"https://api.github.com/repos/cogneco/ooc-kean/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cogneco/ooc-kean/statuses/{sha}","languages_url":"https://api.github.com/repos/cogneco/ooc-kean/languages","stargazers_url":"https://api.github.com/repos/cogneco/ooc-kean/stargazers","contributors_url":"https://api.github.com/repos/cogneco/ooc-kean/contributors","subscribers_url":"https://api.github.com/repos/cogneco/ooc-kean/subscribers","subscription_url":"https://api.github.com/repos/cogneco/ooc-kean/subscription","commits_url":"https://api.github.com/repos/cogneco/ooc-kean/commits{/sha}","git_commits_url":"https://api.github.com/repos/cogneco/ooc-kean/git/commits{/sha}","comments_url":"https://api.github.com/repos/cogneco/ooc-kean/comments{/number}","issue_comment_url":"https://api.github.com/repos/cogneco/ooc-kean/issues/comments{/number}","contents_url":"https://api.github.com/repos/cogneco/ooc-kean/contents/{+path}","compare_url":"https://api.github.com/repos/cogneco/ooc-kean/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cogneco/ooc-kean/merges","archive_url":"https://api.github.com/repos/cogneco/ooc-kean/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cogneco/ooc-kean/downloads","issues_url":"https://api.github.com/repos/cogneco/ooc-kean/issues{/number}","pulls_url":"https://api.github.com/repos/cogneco/ooc-kean/pulls{/number}","milestones_url":"https://api.github.com/repos/cogneco/ooc-kean/milestones{/number}","notifications_url":"https://api.github.com/repos/cogneco/ooc-kean/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cogneco/ooc-kean/labels{/name}","releases_url":"https://api.github.com/repos/cogneco/ooc-kean/releases{/id}","created_at":"2014-10-15T13:42:17Z","updated_at":"2015-05-08T13:13:16Z","pushed_at":"2015-09-01T11:40:50Z","git_url":"git://github.com/cogneco/ooc-kean.git","ssh_url":"git@github.com:cogneco/ooc-kean.git","clone_url":"https://github.com/cogneco/ooc-kean.git","svn_url":"https://github.com/cogneco/ooc-kean","homepage":"","size":14324,"stargazers_count":3,"watchers_count":3,"language":"ooc","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":2,"forks":14,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336"},"html":{"href":"https://github.com/cogneco/ooc-kean/pull/336"},"issue":{"href":"https://api.github.com/repos/cogneco/ooc-kean/issues/336"},"comments":{"href":"https://api.github.com/repos/cogneco/ooc-kean/issues/336/comments"},"review_comments":{"href":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336/comments"},"review_comment":{"href":"https://api.github.com/repos/cogneco/ooc-kean/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cogneco/ooc-kean/pulls/336/commits"},"statuses":{"href":"https://api.github.com/repos/cogneco/ooc-kean/statuses/5b92a8ee3fcb5fc8baaaeda889e0d3db3b69ffa8"}}}}