From e1eadaeae93062243defb2a7672b76afbeee91ec Mon Sep 17 00:00:00 2001 From: mforets Date: Thu, 12 Dec 2019 02:28:13 -0300 Subject: [PATCH 1/2] add concrete minkowski difference w/singleton functions --- src/ConcreteOperations/minkowski_difference.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ConcreteOperations/minkowski_difference.jl b/src/ConcreteOperations/minkowski_difference.jl index cffcf5bffe..d57e78702f 100644 --- a/src/ConcreteOperations/minkowski_difference.jl +++ b/src/ConcreteOperations/minkowski_difference.jl @@ -61,7 +61,6 @@ function minkowski_difference(P::LazySet{N}, Q::LazySet{N}) where {N<:Real} end end - """ pontryagin_difference(P::LazySet{N}, Q::LazySet{N}) where {N<:Real} @@ -74,3 +73,7 @@ Due to inconsistent naming conventions, both the name *Minkowski difference* and """ const pontryagin_difference = minkowski_difference + +# concrete minkowski difference with singleton +minkowski_difference(X::LazySet, S::AbstractSingleton) = translate(X, -element(S)) +minkowski_difference(X::LazySet, ::ZerosSet) = X From f899b7c9db9b9c91fd9eea7c0737b343432cbd89 Mon Sep 17 00:00:00 2001 From: Marcelo Forets Date: Thu, 12 Dec 2019 02:30:47 -0300 Subject: [PATCH 2/2] Update src/ConcreteOperations/minkowski_difference.jl --- src/ConcreteOperations/minkowski_difference.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ConcreteOperations/minkowski_difference.jl b/src/ConcreteOperations/minkowski_difference.jl index d57e78702f..9e69a4b8b6 100644 --- a/src/ConcreteOperations/minkowski_difference.jl +++ b/src/ConcreteOperations/minkowski_difference.jl @@ -76,4 +76,4 @@ const pontryagin_difference = minkowski_difference # concrete minkowski difference with singleton minkowski_difference(X::LazySet, S::AbstractSingleton) = translate(X, -element(S)) -minkowski_difference(X::LazySet, ::ZerosSet) = X +minkowski_difference(X::LazySet, ::ZeroSet) = X