From 70ee380b1d6070a3e5ae159b7757b07854804729 Mon Sep 17 00:00:00 2001 From: schillic Date: Mon, 24 Sep 2018 15:20:41 +0200 Subject: [PATCH] add alias 'disjoint' for 'is_intersection_empty' --- docs/src/lib/binary_functions.md | 1 + src/is_intersection_empty.jl | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/src/lib/binary_functions.md b/docs/src/lib/binary_functions.md index 969fde98e0..b0c42442a8 100644 --- a/docs/src/lib/binary_functions.md +++ b/docs/src/lib/binary_functions.md @@ -34,6 +34,7 @@ end ## Check for emptiness of intersection ```@docs +isdisjoint is_intersection_empty(::AbstractHyperrectangle{N}, ::AbstractHyperrectangle{N}, ::Bool=false) where {N<:Real} is_intersection_empty(::AbstractHyperrectangle{N}, ::AbstractSingleton{N}, ::Bool=false) where {N<:Real} is_intersection_empty(::AbstractSingleton{N}, ::LazySet{N}, ::Bool=false) where {N<:Real} diff --git a/src/is_intersection_empty.jl b/src/is_intersection_empty.jl index 052371e5fb..30631752e8 100644 --- a/src/is_intersection_empty.jl +++ b/src/is_intersection_empty.jl @@ -1,4 +1,5 @@ -export is_intersection_empty +export is_intersection_empty, + isdisjoint # --- AbstractHyperrectangle --- @@ -678,3 +679,14 @@ function is_intersection_empty(hp::Union{Hyperplane{N}, Line{N}}, )::Union{Bool, Tuple{Bool,Vector{N}}} where N<:Real return is_intersection_empty(X, hp, witness) end + + +# --- alias --- + + +""" + isdisjoint(X, Y) + +An alternative name for `is_intersection_empty(X, Y)`. +""" +const isdisjoint = is_intersection_empty