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

Generic overapproximate by falling back to convert #1229

Closed
schillic opened this issue Mar 12, 2019 · 2 comments · Fixed by #3335
Closed

Generic overapproximate by falling back to convert #1229

schillic opened this issue Mar 12, 2019 · 2 comments · Fixed by #3335
Assignees
Labels
conversion 🔄 Conversion between types extension ⬆️ Extension of an existing feature

Comments

@schillic
Copy link
Member

Instead of duplicating these overapproximate(X, Y) = convert(Y, X) methods, we could define one such fallback method that checks for hasmethod and otherwise throws an error.

@schillic schillic added extension ⬆️ Extension of an existing feature conversion 🔄 Conversion between types labels Mar 12, 2019
@mforets
Copy link
Member

mforets commented Mar 12, 2019

Yes, i thought about this recently. I think it is a good idea, but it may need to fix ambiguities for cases that are already generic in the set type, e.g. for overapproximate(::LazySet, Hyperrectangle), we would not like to use the convert fallback (always).

@schillic
Copy link
Member Author

True, but I hope that Julia will consider the other methods as "more specific" and choose them automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conversion 🔄 Conversion between types extension ⬆️ Extension of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants