File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
- # the only parametric sets in this library are polynomial zonotopes;
2
- # hence, we compute the normal Minkowski sum for all other set combinations
1
+ # for non-parametric set types, the exact sum coincides with the Minkowski sum
3
2
function exact_sum (X:: LazySet , Y:: LazySet )
4
3
@assert dim (X) == dim (Y) " the dimensions of the given sets should match, " *
5
4
" but they are $(dim (X)) and $(dim (Y)) , respectively"
6
5
7
- if X isa AbstractPolynomialZonotope || Y isa AbstractPolynomialZonotope
6
+ if isparametrictype ( typeof (X)) || isparametrictype ( typeof (Y))
8
7
throw (ArgumentError (" `exact_sum` for set types $(typeof (X)) and " *
9
8
" $(typeof (Y)) is not implemented" ))
10
9
end
10
+
11
11
return minkowski_sum (X, Y)
12
12
end
Original file line number Diff line number Diff line change 123
123
124
124
isboundedtype (:: Type{<:AbstractPolynomialZonotope} ) = true
125
125
126
+ isparametrictype (:: Type{<:AbstractPolynomialZonotope} ) = true
127
+
126
128
dim (PZ:: AbstractPolynomialZonotope ) = length (center (PZ))
127
129
128
130
isempty (PZ:: AbstractPolynomialZonotope ) = false
Original file line number Diff line number Diff line change @@ -1650,3 +1650,6 @@ function vertices_list_1d(X::LazySet)
1650
1650
l, h = extrema (X, 1 )
1651
1651
return _isapprox (l, h) ? [[l]] : [[l], [h]]
1652
1652
end
1653
+
1654
+ # internal function to detect parametric set types
1655
+ isparametrictype (:: Type{<:LazySet} ) = false
You can’t perform that action at this time.
0 commit comments