From aad21f57079f4fe5c6b34ebac54dc5b878880ad7 Mon Sep 17 00:00:00 2001 From: schillic Date: Sat, 26 Jan 2019 11:49:01 +0100 Subject: [PATCH] added symmetric method --- src/concrete_intersection.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/concrete_intersection.jl b/src/concrete_intersection.jl index 7a0737daf7..0334b8b2ba 100644 --- a/src/concrete_intersection.jl +++ b/src/concrete_intersection.jl @@ -646,3 +646,13 @@ The polytope obtained by the intersection of `l.M * L.X` and `S`. function intersection(L::LinearMap{N}, S::LazySet{N}) where {N} return intersection(linear_map(L.M, L.X), S) end + +# symmetric method +function intersection(S::LazySet{N}, L::LinearMap{N}) where {N} + return intersection(L, S) +end + +# disambiguation +function intersection(L1::LinearMap{N}, L2::LinearMap{N}) where {N} + return intersection(linear_map(L1.M, L1.X), linear_map(L2.M, L2.X)) +end