Skip to content
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

Merged
merged 4 commits into from
Mar 6, 2018
Merged

Decompose blocks of different dimension #282

merged 4 commits into from
Mar 6, 2018

Conversation

mforets
Copy link
Member

@mforets mforets commented Mar 6, 2018

Closes #281.

Copy link
Member

@schillic schillic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good!


#### Different dimensions

By default, `decompose` returns a Cartesian product of `Hyperrectangle` sets.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"2D"?

LazySets.Hyperrectangle{Float64}([0.0, 0.0], [1.0, 1.0])
```

Other block sizes can be specified using the `blocks` option, that refers to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that → which

true
true

julia> [ai isa Interval for ai in array(decompose(S, set_type=Interval))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One sentence about Interval?

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variables → indices?

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:
Copy link
Member

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)
Copy link
Member

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.

@mforets mforets merged commit faf63c7 into master Mar 6, 2018
@mforets mforets deleted the mforets/281 branch March 6, 2018 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants