diff --git a/src/Interfaces/LazySet.jl b/src/Interfaces/LazySet.jl index ee034cf5a1..9af8dee6b8 100644 --- a/src/Interfaces/LazySet.jl +++ b/src/Interfaces/LazySet.jl @@ -1182,6 +1182,13 @@ We apply the function `linear_map`. ::Nothing=nothing, n::Int=dim(S) ) where {N} + return _project_linear_map(S, block, n) +end + +@inline function _project_linear_map(S::LazySet{N}, + block::AbstractVector{Int}, + n::Int=dim(S) + ) where {N} M = projection_matrix(block, n, N) return linear_map(M, S) end diff --git a/src/LazyOperations/CartesianProduct.jl b/src/LazyOperations/CartesianProduct.jl index 3cf0ab92a7..7d265cf480 100644 --- a/src/LazyOperations/CartesianProduct.jl +++ b/src/LazyOperations/CartesianProduct.jl @@ -298,7 +298,7 @@ end function project(cp::CartesianProduct, block::AbstractVector{Int}) res = _project_cp_same_block(cp, block) if res == nothing - res = invoke(project, Tuple{LazySet, typeof(block)}, cp, block) + res = _project_linear_map(cp, block) end return res end