-
Notifications
You must be signed in to change notification settings - Fork 33
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
Decompose blocks of different dimension #282
Conversation
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.
Very good!
src/Approximations/decompositions.jl
Outdated
|
||
#### Different dimensions | ||
|
||
By default, `decompose` returns a Cartesian product of `Hyperrectangle` sets. |
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.
"2D"?
src/Approximations/decompositions.jl
Outdated
LazySets.Hyperrectangle{Float64}([0.0, 0.0], [1.0, 1.0]) | ||
``` | ||
|
||
Other block sizes can be specified using the `blocks` option, that refers to |
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.
that → which
src/Approximations/decompositions.jl
Outdated
true | ||
true | ||
|
||
julia> [ai isa Interval for ai in array(decompose(S, set_type=Interval))] |
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.
One sentence about Interval
?
src/Approximations/decompositions.jl
Outdated
We can define different set types for different blocks, using the | ||
optional `block_types` input argument. It is a dictionary where the keys correspond | ||
to set types, and the values correspond to the blocks, namely the initial and final | ||
block variables should be given. |
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.
variables → indices?
src/Approximations/decompositions.jl
Outdated
LazySets.Hyperrectangle{Float64}([0.0, 0.0], [1.0, 1.0]) | ||
``` | ||
|
||
We can the options, and the ``ε`` is passed to the `HPolygon` if it corresponds: |
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.
We can additionally pass ε
, which is automatically used for each HPolygon
type block.
for bi in val | ||
push!(set_type, key) | ||
push!(initial_block_indices, bi[1]) | ||
push!(blocks, bi[end]-bi[1]+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.
Maybe do not add +1
, and then you can remove the - 1
.
Closes #281.