Closed hexaeder closed 5 months ago
SII was refactored relatively recently to avoid having to collect
array symbolics (since MTK doesn't want to do that either). If you implement variable_index(indp::MyIndexProvider, as::MyArraySymbolic)
(and parameter_index
, is_*
etc..) it should just work.
Hm thats what I am doing right now. But I thought collecting at a higher level is nicer, because otherwise I need to collect both at is_variable
and variable_index
calls (or implement some lazy iterator thing). Also I need to recreate some of the dispatch machinery depending on whether I get scalars, arrays, tuples and so on which "just works" if I only need to implement the scalar version. But I'll do it on the package level then!
Is your feature request related to a problem? Please describe.
I'd like to create vector indexes which are not fully determined on their own, more specifically I'd like
MySymbolicIndex(:)
to access all variables of a certain component. I register this as anArraySymbolic
which I cannotcollect
into a vector ofScalarSymbolic
without knowledge from the index provider.Describe the solution you’d like
Create a new abstraction to collect the array symbolic which defaults to simple
collect
but can be specified if necessary.So I could define
to expand in a more complex manner.
If you're open to the suggestion I could also prepare a PR.