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

Multidimensional interval sets #66

Open
zsunberg opened this issue Jun 24, 2020 · 3 comments
Open

Multidimensional interval sets #66

zsunberg opened this issue Jun 24, 2020 · 3 comments

Comments

@zsunberg
Copy link
Contributor

It would be nice to have some multidimensional interval sets, i.e.
Interval([1,1], [2,3]) would be the "box" between 1 and 2 on the x axis and between 1 and 3 on the y axis.

Currently, it doesn't work as we would want it to:

julia> [1.5,2.5] in Interval([1,1], [2,2])
true

see e.g. JuliaPOMDP/POMDPs.jl#301, JuliaReinforcementLearning/CommonRLInterface.jl#15 for description of needs.

Is that beyond the scope of this package?

@dlfivefifty
Copy link
Member

You could use ProductDomain from DomainSets.jl to represent this as a product of two intervals

@timholy
Copy link
Member

timholy commented Jun 24, 2020

julia> all((1.5, 1.7) .∈ (1..2, 1..2))
true

julia> all((1.5, 2.7) .∈ (1..2, 1..2))
false

When it's just broadcasting, I'd be reluctant to add something to this package.

@timholy
Copy link
Member

timholy commented Jun 24, 2020

Interval([1,1], [2,2]) seems busted.

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

No branches or pull requests

3 participants