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

Set difference between intervals #1316

Closed
mforets opened this issue Apr 30, 2019 · 0 comments · Fixed by #1330
Closed

Set difference between intervals #1316

mforets opened this issue Apr 30, 2019 · 0 comments · Fixed by #1330
Assignees

Comments

@mforets
Copy link
Member

mforets commented Apr 30, 2019

In the 1D case, the set difference I1 \ I2 between the intervals I1 and I2 can be either:

a- the empty set
b- one interval (either corresponding to the left side or to the right side)
c- two intervals (one subinterval corresponding to the left side and another one to the right side)

I thought about this and i'm inclined to make the set difference return a UnionSetArray of intervals both in b and c. This may simplify extending to two or higher dimensions.

See also #1305

@mforets mforets self-assigned this Apr 30, 2019
mforets added a commit that referenced this issue May 6, 2019
* add concrete difference

* add tests

* Update test/unit_Interval.jl

Co-Authored-By: mforets <[email protected]>

* Update src/concrete_difference.jl

Co-Authored-By: mforets <[email protected]>

* rename to difference.jl

* update return type

* update tests

* fix docs

* fix subscripts

* add algorithm

* Update src/difference.jl

Co-Authored-By: mforets <[email protected]>

* Update src/difference.jl

Co-Authored-By: mforets <[email protected]>

* add isflat and additional docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant