-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3670 from JuliaReach/schillic/exact_sum
Default implementation for `exact_sum`
- Loading branch information
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# the only parametric sets in this library are polynomial zonotopes; | ||
# hence, we compute the normal Minkowski sum for all other set combinations | ||
function exact_sum(X::LazySet, Y::LazySet) | ||
@assert dim(X) == dim(Y) "the dimensions of the given sets should match, " * | ||
"but they are $(dim(X)) and $(dim(Y)), respectively" | ||
|
||
if X isa AbstractPolynomialZonotope || Y isa AbstractPolynomialZonotope | ||
throw(ArgumentError("`exact_sum` for set types $(typeof(X)) and " * | ||
"$(typeof(Y)) is not implemented")) | ||
end | ||
return minkowski_sum(X, Y) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters