I wish everyone would get with the times. "Green" is good, and OpenG already has this function.
Jim You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7
The index array node is a resizable node that allows you to index into the array multiple times. It feels a little odd to overload that node to accept a boolean array that filters the input array. What would it mean to have the boolean array wired up and the node expanded to allow more than one set if indices?
I do agree, however, that replacing the case structure inside of a for loop with a single node would make the diagram code more readable and compact. My initial reaction, though, is that tst's example of a condition on the indexed tunnel is slightly more readable. I'm just not quite sure yet how we could make that condition discoverable by users. I definitely wouldn't want it to be turned on by default. It should be an option that you have to explicitly turn on. Otherwise you would have lots of cases where there would be unwired conditions on auto-indexing tunnels.
We'll keep this idea in mind the next time we are evaluating the array palette.
Actually, I would say that the (intelligent) filtering is done beforehand, in my example for all i: a(i)>2". The boolean array just (kind of) indexes the array.
>...that replacing the case structure inside of a for loop..
Not just the case structure, but the loop alltogether.
>..What.....the node expanded to allow more than one set if indices?...
Yes, that needs a little thinking, but nothing that cannot be solved. One solution is not to allow the node to expand if a boolean array is connected, an error message explaining if a wrong combination/wrong datatype is connected, ..
>We'll keep this idea in mind the next time we are evaluating the array palette.
That's good 😉 What's your role in all this?
Some further thinking brought me to the following addition(see diagram):
- The 1dim array as proposed
- Could be expanded to the 2dim array,
the index node still accepting a 1dim boolean array but applies this row wise.