-
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
Revise decompose interface #1177
Comments
Maybe we should rather use dispatch on the argument type. Having all these options available suggests that you can combine them. |
Let's recap on the purpose of
(*) these are
Proposal (A) for a combined interface:
Where:
Examples (assume that decompose(S, partition=[[1],[2,3]], set_types=Dict(1=>Interval, 2=>HPolygon))
decompose(S, partition=[[1],[2,3]], set_types=Dict(1=>Interval, 2=>(HPolygon, :ε=>1e-3)))
decompose(S, partition=[[1],[2,3]], set_types=Dict(1=>Interval, 2=>(HPolytope, :oct))) Proposal (B) for a combined interface. Noting that (A) can be combined even further:
Where:
Examples (assume that decompose(S, partition=Dict([1]=>Interval, [2,3]=>HPolygon))
decompose(S, partition=Dict([1]=>Interval, [2,3]=>(HPolygon, :ε=>1e-3)))
decompose(S, partition=Dict([1]=>Interval, [2,3]=>(HPolytope, :oct))) |
The proposal doesn't rule out that we overload |
We decided to go for option (A) above. |
If the options provided to decompose are incompatible, it chooses to ignore some and proceed. But this choice is to a certain extent arbitrary.
Proposal: return an error if the options passed to
decompose
are incompatible, see the Notes for examples.The text was updated successfully, but these errors were encountered: