-
Notifications
You must be signed in to change notification settings - Fork 37
Add methods and type for MatrixSets
#3966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e8f11d8
to
c5715e4
Compare
Could you add a separate PR for fixing |
Done. Should I undo the commit in this one then? |
Yes - there will be a merge conflict sooner or later anyway. |
dc0b08b
to
cb8936a
Compare
Still a conflict here... |
e952b42
to
621e004
Compare
reduced = MatrixZonotope{eltype(factors_[1]), typeof(center(factors_[1]))}[] | ||
|
||
i = 1 | ||
while i < length(factors_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be turned into a normal for
loop. Is that intended? See also the next comment.
end | ||
|
||
# in the last element apply linear map to the left | ||
if i == length(factors_) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition always holds.
end | ||
end | ||
if isempty(reduced) | ||
return center(factors_[end-1]) # return concrete matrix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why end-1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this was added to fix an edge case, but it actually breaks others. I will edit it and add more corner tests
while i < length(factors_) | ||
MZ = factors_[i] | ||
if isempty(generators(MZ)) | ||
factors_[i+1] = linear_map(center(MZ), factors_[i + 1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand this code. This function should not modify factors_
.
Co-authored-by: Christian Schilling <[email protected]>
Apart from |
yes lets move it to a different PR, |
…le.jl Co-authored-by: Christian Schilling <[email protected]>
I removed all the appearence of |
This is the first of a sequence of 3/4 pull requests to implement the overapproximation methods for maps with matrix zonotopes. In this PR i implement
AbstractMatrixZonotope
supertypeMatrixZonotopeProduct
type to store lazy products of matrix zonotopesMatrixZonotopeExp
to represent lazily the exponentialoverapproximate_norm
andremove_redundant_factors
forMatrixZonotopeProduct
linear_map
forMatrixZonotope