{"action":"created","comment":{"url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/comments/219683072","pull_request_review_id":157923287,"id":219683072,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTY4MzA3Mg==","diff_hunk":"@@ -595,3 +596,83 @@ function is_intersection_empty(set::AbstractPolytope{N},\n                               )::Union{Bool, Tuple{Bool, Vector{N}}} where {N<:Real}\n     return is_intersection_empty(point, set, witness)\n end\n+\n+# --- Hyperplane ---\n+\n+\"\"\"\n+    is_intersection_empty(X::LazySet{N},\n+                          hp::Union{Hyperplane{N}, Line{N}},\n+                          [witness]::Bool=false\n+                         )::Union{Bool, Tuple{Bool,Vector{N}}} where N<:Real\n+\n+Check whether a compact set an a hyperplane do not intersect, and otherwise\n+optionally compute a witness.\n+\n+### Input\n+\n+- `X`       -- compact set\n+- `hp`      -- hyperplane\n+- `witness` -- (optional, default: `false`) compute a witness if activated\n+\n+### Output\n+\n+* If `witness` option is deactivated: `true` iff ``P ∩ Q = ∅``\n+* If `witness` option is activated:\n+  * `(true, [])` iff ``P ∩ Q = ∅``\n+  * `(false, v)` iff ``P ∩ Q ≠ ∅`` and ``v ∈ P ∩ Q``\n+\n+### Notes\n+\n+We assume that `X` is compact.\n+Otherwise, the support vector queries may fail.\n+\n+### Algorithm\n+\n+A compact convex set intersects with a hyperplane iff the support function in\n+the negative resp. positive direction of the hyperplane's normal vector ``a`` is\n+to the left resp. right of the hyperplane's constraint ``b``:\n+\n+```math\n+-ρ(-a) ≤ b ≤ ρ(a)\n+```\n+\n+For witness generation, we compute a line connecting the support vectors to the\n+left and right, and then take the intersection of the line with the hyperplane.\n+We follow\n+[this algorithm](https://en.wikipedia.org/wiki/Line%E2%80%93plane_intersection#Algebraic_form)\n+for the line-hyperplane intersection.\n+\"\"\"\n+function is_intersection_empty(X::LazySet{N},\n+                               hp::Union{Hyperplane{N}, Line{N}},\n+                               witness::Bool=false\n+                              )::Union{Bool, Tuple{Bool,Vector{N}}} where N<:Real\n+    sv_left = σ(-hp.a, X)\n+    if -dot(sv_left, -hp.a) <= hp.b","path":"src/is_intersection_empty.jl","position":71,"original_position":71,"commit_id":"3ad6e5fe4509a7bbfdc3214d5b4344854a8b446e","original_commit_id":"3ad6e5fe4509a7bbfdc3214d5b4344854a8b446e","user":{"login":"mforets","id":12424594,"node_id":"MDQ6VXNlcjEyNDI0NTk0","avatar_url":"https://avatars3.githubusercontent.com/u/12424594?v=4","gravatar_id":"","url":"https://api.github.com/users/mforets","html_url":"https://github.com/mforets","followers_url":"https://api.github.com/users/mforets/followers","following_url":"https://api.github.com/users/mforets/following{/other_user}","gists_url":"https://api.github.com/users/mforets/gists{/gist_id}","starred_url":"https://api.github.com/users/mforets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mforets/subscriptions","organizations_url":"https://api.github.com/users/mforets/orgs","repos_url":"https://api.github.com/users/mforets/repos","events_url":"https://api.github.com/users/mforets/events{/privacy}","received_events_url":"https://api.github.com/users/mforets/received_events","type":"User","site_admin":false},"body":"maybe use `ρ(d, X)` directly. for eventual optimizations #600.","created_at":"2018-09-22T21:52:08Z","updated_at":"2018-09-22T21:52:08Z","html_url":"https://github.com/JuliaReach/LazySets.jl/pull/650#discussion_r219683072","pull_request_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/comments/219683072"},"html":{"href":"https://github.com/JuliaReach/LazySets.jl/pull/650#discussion_r219683072"},"pull_request":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650"}}},"pull_request":{"url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650","id":217472419,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NDcyNDE5","html_url":"https://github.com/JuliaReach/LazySets.jl/pull/650","diff_url":"https://github.com/JuliaReach/LazySets.jl/pull/650.diff","patch_url":"https://github.com/JuliaReach/LazySets.jl/pull/650.patch","issue_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/650","number":650,"state":"open","locked":false,"title":"#640 - Check for empty intersection of compact set with Hyperplane","user":{"login":"schillic","id":9656686,"node_id":"MDQ6VXNlcjk2NTY2ODY=","avatar_url":"https://avatars2.githubusercontent.com/u/9656686?v=4","gravatar_id":"","url":"https://api.github.com/users/schillic","html_url":"https://github.com/schillic","followers_url":"https://api.github.com/users/schillic/followers","following_url":"https://api.github.com/users/schillic/following{/other_user}","gists_url":"https://api.github.com/users/schillic/gists{/gist_id}","starred_url":"https://api.github.com/users/schillic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schillic/subscriptions","organizations_url":"https://api.github.com/users/schillic/orgs","repos_url":"https://api.github.com/users/schillic/repos","events_url":"https://api.github.com/users/schillic/events{/privacy}","received_events_url":"https://api.github.com/users/schillic/received_events","type":"User","site_admin":false},"body":"Closes #640.","created_at":"2018-09-22T18:49:09Z","updated_at":"2018-09-22T21:52:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66d83fe47d3c5d4c22cb69fe12358adf5fabfcc1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650/commits","review_comments_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650/comments","review_comment_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/650/comments","statuses_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/statuses/3ad6e5fe4509a7bbfdc3214d5b4344854a8b446e","head":{"label":"JuliaReach:schillic/640","ref":"schillic/640","sha":"3ad6e5fe4509a7bbfdc3214d5b4344854a8b446e","user":{"login":"JuliaReach","id":33028082,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDI4MDgy","avatar_url":"https://avatars3.githubusercontent.com/u/33028082?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaReach","html_url":"https://github.com/JuliaReach","followers_url":"https://api.github.com/users/JuliaReach/followers","following_url":"https://api.github.com/users/JuliaReach/following{/other_user}","gists_url":"https://api.github.com/users/JuliaReach/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaReach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaReach/subscriptions","organizations_url":"https://api.github.com/users/JuliaReach/orgs","repos_url":"https://api.github.com/users/JuliaReach/repos","events_url":"https://api.github.com/users/JuliaReach/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaReach/received_events","type":"Organization","site_admin":false},"repo":{"id":105701832,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU3MDE4MzI=","name":"LazySets.jl","full_name":"JuliaReach/LazySets.jl","private":false,"owner":{"login":"JuliaReach","id":33028082,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDI4MDgy","avatar_url":"https://avatars3.githubusercontent.com/u/33028082?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaReach","html_url":"https://github.com/JuliaReach","followers_url":"https://api.github.com/users/JuliaReach/followers","following_url":"https://api.github.com/users/JuliaReach/following{/other_user}","gists_url":"https://api.github.com/users/JuliaReach/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaReach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaReach/subscriptions","organizations_url":"https://api.github.com/users/JuliaReach/orgs","repos_url":"https://api.github.com/users/JuliaReach/repos","events_url":"https://api.github.com/users/JuliaReach/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaReach/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/JuliaReach/LazySets.jl","description":"A Julia package for calculus with convex sets","fork":false,"url":"https://api.github.com/repos/JuliaReach/LazySets.jl","forks_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/forks","keys_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/teams","hooks_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/events","assignees_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/tags","blobs_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/subscription","commits_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/merges","archive_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/downloads","issues_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/deployments","created_at":"2017-10-03T20:50:18Z","updated_at":"2018-09-22T21:17:16Z","pushed_at":"2018-09-22T21:35:37Z","git_url":"git://github.com/JuliaReach/LazySets.jl.git","ssh_url":"git@github.com:JuliaReach/LazySets.jl.git","clone_url":"https://github.com/JuliaReach/LazySets.jl.git","svn_url":"https://github.com/JuliaReach/LazySets.jl","homepage":"","size":14678,"stargazers_count":22,"watchers_count":22,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":125,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":125,"watchers":22,"default_branch":"master"}},"base":{"label":"JuliaReach:master","ref":"master","sha":"02fcd3241f1a5ad513727c570a156c712ef673e8","user":{"login":"JuliaReach","id":33028082,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDI4MDgy","avatar_url":"https://avatars3.githubusercontent.com/u/33028082?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaReach","html_url":"https://github.com/JuliaReach","followers_url":"https://api.github.com/users/JuliaReach/followers","following_url":"https://api.github.com/users/JuliaReach/following{/other_user}","gists_url":"https://api.github.com/users/JuliaReach/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaReach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaReach/subscriptions","organizations_url":"https://api.github.com/users/JuliaReach/orgs","repos_url":"https://api.github.com/users/JuliaReach/repos","events_url":"https://api.github.com/users/JuliaReach/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaReach/received_events","type":"Organization","site_admin":false},"repo":{"id":105701832,"node_id":"MDEwOlJlcG9zaXRvcnkxMDU3MDE4MzI=","name":"LazySets.jl","full_name":"JuliaReach/LazySets.jl","private":false,"owner":{"login":"JuliaReach","id":33028082,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMDI4MDgy","avatar_url":"https://avatars3.githubusercontent.com/u/33028082?v=4","gravatar_id":"","url":"https://api.github.com/users/JuliaReach","html_url":"https://github.com/JuliaReach","followers_url":"https://api.github.com/users/JuliaReach/followers","following_url":"https://api.github.com/users/JuliaReach/following{/other_user}","gists_url":"https://api.github.com/users/JuliaReach/gists{/gist_id}","starred_url":"https://api.github.com/users/JuliaReach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuliaReach/subscriptions","organizations_url":"https://api.github.com/users/JuliaReach/orgs","repos_url":"https://api.github.com/users/JuliaReach/repos","events_url":"https://api.github.com/users/JuliaReach/events{/privacy}","received_events_url":"https://api.github.com/users/JuliaReach/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/JuliaReach/LazySets.jl","description":"A Julia package for calculus with convex sets","fork":false,"url":"https://api.github.com/repos/JuliaReach/LazySets.jl","forks_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/forks","keys_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/teams","hooks_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/hooks","issue_events_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/events{/number}","events_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/events","assignees_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/assignees{/user}","branches_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/branches{/branch}","tags_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/tags","blobs_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/languages","stargazers_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/stargazers","contributors_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/contributors","subscribers_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/subscribers","subscription_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/subscription","commits_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/contents/{+path}","compare_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/merges","archive_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/downloads","issues_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues{/number}","pulls_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/labels{/name}","releases_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/releases{/id}","deployments_url":"https://api.github.com/repos/JuliaReach/LazySets.jl/deployments","created_at":"2017-10-03T20:50:18Z","updated_at":"2018-09-22T21:17:16Z","pushed_at":"2018-09-22T21:35:37Z","git_url":"git://github.com/JuliaReach/LazySets.jl.git","ssh_url":"git@github.com:JuliaReach/LazySets.jl.git","clone_url":"https://github.com/JuliaReach/LazySets.jl.git","svn_url":"https://github.com/JuliaReach/LazySets.jl","homepage":"","size":14678,"stargazers_count":22,"watchers_count":22,"language":"Julia","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":125,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":125,"watchers":22,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650"},"html":{"href":"https://github.com/JuliaReach/LazySets.jl/pull/650"},"issue":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/650"},"comments":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/issues/650/comments"},"review_comments":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650/comments"},"review_comment":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/pulls/650/commits"},"statuses":{"href":"https://api.github.com/repos/JuliaReach/LazySets.jl/statuses/3ad6e5fe4509a7bbfdc3214d5b4344854a8b446e"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mforets"}}