{"action":"created","comment":{"url":"https://api.github.com/repos/tensorics/tensorics-core/pulls/comments/87626974","pull_request_review_id":8225315,"id":87626974,"diff_hunk":"@@ -0,0 +1,105 @@\n+/**\n+ * Copyright (c) 2016 European Organisation for Nuclear Research (CERN), All Rights Reserved.\n+ */\n+\n+package org.tensorics.core.booleans.operations;\n+\n+import java.util.Collection;\n+import java.util.HashSet;\n+import java.util.List;\n+import java.util.Set;\n+\n+import org.tensorics.core.commons.options.ImmutableOptionRegistry;\n+import org.tensorics.core.commons.options.ManipulationOption;\n+import org.tensorics.core.commons.options.OptionRegistry;\n+import org.tensorics.core.math.operations.BinaryFunction;\n+import org.tensorics.core.tensor.Tensor;\n+import org.tensorics.core.tensor.operations.ElementBinaryFunction;\n+import org.tensorics.core.tensor.options.BroadcastMissingDimensionsStrategy;\n+import org.tensorics.core.tensor.options.ExactShapesOrOneZeroStrategy;\n+import org.tensorics.core.tensor.options.LeftContextPreservedStrategy;\n+\n+import com.google.common.collect.ImmutableList;\n+\n+/**\n+ * Reposirtory for the <b>logical operations</b> for Tensor<>: <lu>\n+ * <li>AND {@link #and()}</li>\n+ * <li>AND {@link #and(OptionRegistry)}</li>\n+ * <li>AND {@link #nand()}</li>\n+ * <li>AND {@link #nand(OptionRegistry)}</li>\n+ * <li>OR {@link #or()}</li>\n+ * <li>OR {@link #or(OptionRegistry)}</li>\n+ * <li>XOR {@link #xor()}</li>\n+ * <li>XOR {@link #xor(OptionRegistry)}</li> </lu>\n+ * <p>\n+ * For {@link OptionRegistry} that supports the operations. <lu>\n+ * <li>{@link #defaultRegistry()} returns default options registry that contains the following Options:\n+ * {@link ExactShapesOrOneZeroStrategy}, {@link LeftContextPreservedStrategy},\n+ * {@link BroadcastMissingDimensionsStrategy}</li>\n+ * <li>{@link #defaultRegistry(List)} returns the {@link #defaultRegistry()} with overriden options form the provided\n+ * list</li> </lu>\n+ * \n+ * @author agorzaws\n+ */\n+public final class LogicalTensorOperationsRepository {\n+\n+    private static final ImmutableList<ManipulationOption> DEFAULT_SET = ImmutableList.of(\n+            new LeftContextPreservedStrategy(), new ExactShapesOrOneZeroStrategy(),\n+            new BroadcastMissingDimensionsStrategy());\n+\n+    private static OptionRegistry<ManipulationOption> registry(Collection<ManipulationOption> options) {\n+        return ImmutableOptionRegistry.of(options);\n+    }\n+\n+    public static OptionRegistry<ManipulationOption> defaultRegistry(List<ManipulationOption> singletonList) {","path":"src/java/org/tensorics/core/booleans/operations/LogicalTensorOperationsRepository.java","position":54,"original_position":54,"commit_id":"b238f5fa1516d108c1caa2310d2577a60d1ee902","original_commit_id":"b238f5fa1516d108c1caa2310d2577a60d1ee902","user":{"login":"kaifox","id":986001,"avatar_url":"https://avatars.githubusercontent.com/u/986001?v=3","gravatar_id":"","url":"https://api.github.com/users/kaifox","html_url":"https://github.com/kaifox","followers_url":"https://api.github.com/users/kaifox/followers","following_url":"https://api.github.com/users/kaifox/following{/other_user}","gists_url":"https://api.github.com/users/kaifox/gists{/gist_id}","starred_url":"https://api.github.com/users/kaifox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaifox/subscriptions","organizations_url":"https://api.github.com/users/kaifox/orgs","repos_url":"https://api.github.com/users/kaifox/repos","events_url":"https://api.github.com/users/kaifox/events{/privacy}","received_events_url":"https://api.github.com/users/kaifox/received_events","type":"User","site_admin":false},"body":"Why passing in here the options? Why not passing in the the registry? Why reimplementing functionality from the OptionsRegistry?","created_at":"2016-11-11T17:38:26Z","updated_at":"2016-11-11T17:41:21Z","html_url":"https://github.com/tensorics/tensorics-core/pull/15#discussion_r87626974","pull_request_url":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/tensorics/tensorics-core/pulls/comments/87626974"},"html":{"href":"https://github.com/tensorics/tensorics-core/pull/15#discussion_r87626974"},"pull_request":{"href":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15","id":93290024,"html_url":"https://github.com/tensorics/tensorics-core/pull/15","diff_url":"https://github.com/tensorics/tensorics-core/pull/15.diff","patch_url":"https://github.com/tensorics/tensorics-core/pull/15.patch","issue_url":"https://api.github.com/repos/tensorics/tensorics-core/issues/15","number":15,"state":"open","locked":false,"title":"Boolean support","user":{"login":"michi42","id":435646,"avatar_url":"https://avatars.githubusercontent.com/u/435646?v=3","gravatar_id":"","url":"https://api.github.com/users/michi42","html_url":"https://github.com/michi42","followers_url":"https://api.github.com/users/michi42/followers","following_url":"https://api.github.com/users/michi42/following{/other_user}","gists_url":"https://api.github.com/users/michi42/gists{/gist_id}","starred_url":"https://api.github.com/users/michi42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michi42/subscriptions","organizations_url":"https://api.github.com/users/michi42/orgs","repos_url":"https://api.github.com/users/michi42/repos","events_url":"https://api.github.com/users/michi42/events{/privacy}","received_events_url":"https://api.github.com/users/michi42/received_events","type":"User","site_admin":false},"body":"Please only merge once agreed with Arek. This PullRequest is merely to be able to review the changes in a more convenient way.\r\n\r\n@kaifox @agorzawski ","created_at":"2016-11-11T07:23:43Z","updated_at":"2016-11-11T17:41:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5ecf50c5869ec6f0e00815e6e1295d8b2f64faa","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15/commits","review_comments_url":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15/comments","review_comment_url":"https://api.github.com/repos/tensorics/tensorics-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tensorics/tensorics-core/issues/15/comments","statuses_url":"https://api.github.com/repos/tensorics/tensorics-core/statuses/b238f5fa1516d108c1caa2310d2577a60d1ee902","head":{"label":"tensorics:boolean-support","ref":"boolean-support","sha":"b238f5fa1516d108c1caa2310d2577a60d1ee902","user":{"login":"tensorics","id":6390561,"avatar_url":"https://avatars.githubusercontent.com/u/6390561?v=3","gravatar_id":"","url":"https://api.github.com/users/tensorics","html_url":"https://github.com/tensorics","followers_url":"https://api.github.com/users/tensorics/followers","following_url":"https://api.github.com/users/tensorics/following{/other_user}","gists_url":"https://api.github.com/users/tensorics/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorics/subscriptions","organizations_url":"https://api.github.com/users/tensorics/orgs","repos_url":"https://api.github.com/users/tensorics/repos","events_url":"https://api.github.com/users/tensorics/events{/privacy}","received_events_url":"https://api.github.com/users/tensorics/received_events","type":"Organization","site_admin":false},"repo":{"id":45263065,"name":"tensorics-core","full_name":"tensorics/tensorics-core","owner":{"login":"tensorics","id":6390561,"avatar_url":"https://avatars.githubusercontent.com/u/6390561?v=3","gravatar_id":"","url":"https://api.github.com/users/tensorics","html_url":"https://github.com/tensorics","followers_url":"https://api.github.com/users/tensorics/followers","following_url":"https://api.github.com/users/tensorics/following{/other_user}","gists_url":"https://api.github.com/users/tensorics/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorics/subscriptions","organizations_url":"https://api.github.com/users/tensorics/orgs","repos_url":"https://api.github.com/users/tensorics/repos","events_url":"https://api.github.com/users/tensorics/events{/privacy}","received_events_url":"https://api.github.com/users/tensorics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorics/tensorics-core","description":null,"fork":false,"url":"https://api.github.com/repos/tensorics/tensorics-core","forks_url":"https://api.github.com/repos/tensorics/tensorics-core/forks","keys_url":"https://api.github.com/repos/tensorics/tensorics-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorics/tensorics-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorics/tensorics-core/teams","hooks_url":"https://api.github.com/repos/tensorics/tensorics-core/hooks","issue_events_url":"https://api.github.com/repos/tensorics/tensorics-core/issues/events{/number}","events_url":"https://api.github.com/repos/tensorics/tensorics-core/events","assignees_url":"https://api.github.com/repos/tensorics/tensorics-core/assignees{/user}","branches_url":"https://api.github.com/repos/tensorics/tensorics-core/branches{/branch}","tags_url":"https://api.github.com/repos/tensorics/tensorics-core/tags","blobs_url":"https://api.github.com/repos/tensorics/tensorics-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorics/tensorics-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorics/tensorics-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorics/tensorics-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorics/tensorics-core/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorics/tensorics-core/languages","stargazers_url":"https://api.github.com/repos/tensorics/tensorics-core/stargazers","contributors_url":"https://api.github.com/repos/tensorics/tensorics-core/contributors","subscribers_url":"https://api.github.com/repos/tensorics/tensorics-core/subscribers","subscription_url":"https://api.github.com/repos/tensorics/tensorics-core/subscription","commits_url":"https://api.github.com/repos/tensorics/tensorics-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorics/tensorics-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorics/tensorics-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorics/tensorics-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorics/tensorics-core/contents/{+path}","compare_url":"https://api.github.com/repos/tensorics/tensorics-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorics/tensorics-core/merges","archive_url":"https://api.github.com/repos/tensorics/tensorics-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorics/tensorics-core/downloads","issues_url":"https://api.github.com/repos/tensorics/tensorics-core/issues{/number}","pulls_url":"https://api.github.com/repos/tensorics/tensorics-core/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorics/tensorics-core/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorics/tensorics-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorics/tensorics-core/labels{/name}","releases_url":"https://api.github.com/repos/tensorics/tensorics-core/releases{/id}","deployments_url":"https://api.github.com/repos/tensorics/tensorics-core/deployments","created_at":"2015-10-30T16:30:10Z","updated_at":"2016-11-08T15:11:57Z","pushed_at":"2016-11-11T07:23:43Z","git_url":"git://github.com/tensorics/tensorics-core.git","ssh_url":"git@github.com:tensorics/tensorics-core.git","clone_url":"https://github.com/tensorics/tensorics-core.git","svn_url":"https://github.com/tensorics/tensorics-core","homepage":null,"size":1814,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":6,"default_branch":"master"}},"base":{"label":"tensorics:master","ref":"master","sha":"3f892e0e341da5b08db95c7db1c8596c815527b2","user":{"login":"tensorics","id":6390561,"avatar_url":"https://avatars.githubusercontent.com/u/6390561?v=3","gravatar_id":"","url":"https://api.github.com/users/tensorics","html_url":"https://github.com/tensorics","followers_url":"https://api.github.com/users/tensorics/followers","following_url":"https://api.github.com/users/tensorics/following{/other_user}","gists_url":"https://api.github.com/users/tensorics/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorics/subscriptions","organizations_url":"https://api.github.com/users/tensorics/orgs","repos_url":"https://api.github.com/users/tensorics/repos","events_url":"https://api.github.com/users/tensorics/events{/privacy}","received_events_url":"https://api.github.com/users/tensorics/received_events","type":"Organization","site_admin":false},"repo":{"id":45263065,"name":"tensorics-core","full_name":"tensorics/tensorics-core","owner":{"login":"tensorics","id":6390561,"avatar_url":"https://avatars.githubusercontent.com/u/6390561?v=3","gravatar_id":"","url":"https://api.github.com/users/tensorics","html_url":"https://github.com/tensorics","followers_url":"https://api.github.com/users/tensorics/followers","following_url":"https://api.github.com/users/tensorics/following{/other_user}","gists_url":"https://api.github.com/users/tensorics/gists{/gist_id}","starred_url":"https://api.github.com/users/tensorics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tensorics/subscriptions","organizations_url":"https://api.github.com/users/tensorics/orgs","repos_url":"https://api.github.com/users/tensorics/repos","events_url":"https://api.github.com/users/tensorics/events{/privacy}","received_events_url":"https://api.github.com/users/tensorics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tensorics/tensorics-core","description":null,"fork":false,"url":"https://api.github.com/repos/tensorics/tensorics-core","forks_url":"https://api.github.com/repos/tensorics/tensorics-core/forks","keys_url":"https://api.github.com/repos/tensorics/tensorics-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tensorics/tensorics-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tensorics/tensorics-core/teams","hooks_url":"https://api.github.com/repos/tensorics/tensorics-core/hooks","issue_events_url":"https://api.github.com/repos/tensorics/tensorics-core/issues/events{/number}","events_url":"https://api.github.com/repos/tensorics/tensorics-core/events","assignees_url":"https://api.github.com/repos/tensorics/tensorics-core/assignees{/user}","branches_url":"https://api.github.com/repos/tensorics/tensorics-core/branches{/branch}","tags_url":"https://api.github.com/repos/tensorics/tensorics-core/tags","blobs_url":"https://api.github.com/repos/tensorics/tensorics-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tensorics/tensorics-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tensorics/tensorics-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/tensorics/tensorics-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tensorics/tensorics-core/statuses/{sha}","languages_url":"https://api.github.com/repos/tensorics/tensorics-core/languages","stargazers_url":"https://api.github.com/repos/tensorics/tensorics-core/stargazers","contributors_url":"https://api.github.com/repos/tensorics/tensorics-core/contributors","subscribers_url":"https://api.github.com/repos/tensorics/tensorics-core/subscribers","subscription_url":"https://api.github.com/repos/tensorics/tensorics-core/subscription","commits_url":"https://api.github.com/repos/tensorics/tensorics-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/tensorics/tensorics-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/tensorics/tensorics-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/tensorics/tensorics-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/tensorics/tensorics-core/contents/{+path}","compare_url":"https://api.github.com/repos/tensorics/tensorics-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tensorics/tensorics-core/merges","archive_url":"https://api.github.com/repos/tensorics/tensorics-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tensorics/tensorics-core/downloads","issues_url":"https://api.github.com/repos/tensorics/tensorics-core/issues{/number}","pulls_url":"https://api.github.com/repos/tensorics/tensorics-core/pulls{/number}","milestones_url":"https://api.github.com/repos/tensorics/tensorics-core/milestones{/number}","notifications_url":"https://api.github.com/repos/tensorics/tensorics-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tensorics/tensorics-core/labels{/name}","releases_url":"https://api.github.com/repos/tensorics/tensorics-core/releases{/id}","deployments_url":"https://api.github.com/repos/tensorics/tensorics-core/deployments","created_at":"2015-10-30T16:30:10Z","updated_at":"2016-11-08T15:11:57Z","pushed_at":"2016-11-11T07:23:43Z","git_url":"git://github.com/tensorics/tensorics-core.git","ssh_url":"git@github.com:tensorics/tensorics-core.git","clone_url":"https://github.com/tensorics/tensorics-core.git","svn_url":"https://github.com/tensorics/tensorics-core","homepage":null,"size":1814,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":7,"forks":1,"open_issues":7,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15"},"html":{"href":"https://github.com/tensorics/tensorics-core/pull/15"},"issue":{"href":"https://api.github.com/repos/tensorics/tensorics-core/issues/15"},"comments":{"href":"https://api.github.com/repos/tensorics/tensorics-core/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/tensorics/tensorics-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tensorics/tensorics-core/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/tensorics/tensorics-core/statuses/b238f5fa1516d108c1caa2310d2577a60d1ee902"}}}}
{"actor":{"display_login":"kaifox"}}