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

Support iterate for finite-dimensional sets #108

Open
dlfivefifty opened this issue Aug 17, 2022 · 2 comments
Open

Support iterate for finite-dimensional sets #108

dlfivefifty opened this issue Aug 17, 2022 · 2 comments

Comments

@dlfivefifty
Copy link
Member

Ran into an issue where a piece of code would have worked if I could iterate over a VcatDomain (something like VcatDomain(OneTo(3), OneTo(5)))

Would be nice if we supported iterate. I started an implementation but wasn't obvious, probably just need to replicate the code for CartesianIndex

@daanhb
Copy link
Member

daanhb commented Aug 17, 2022

Product iteration is simple only in hindsight :-)

@daanhb
Copy link
Member

daanhb commented Aug 19, 2022

Hmm, this will be difficult to get right. There is a fairly comprehensive framework for iterating over combinations of function sets in BasisFunctions.jl, which I'm still not entirely happy with. By implementing axes and friends, I managed to reuse the standard iterators of arrays for product structures and of BlockArrays for composite structures. However, some extensions are needed when combining them: in this package that would be product domains of uniondomains.

It's certainly doable, but I'm not sure it is worth the effort here.

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

2 participants