I would like to basically do an “includes” operation, but on multiple numbers.
I have a list of indices… and I want to pick out specific indices if they match some other numbers, ie. ‘2, 5, and 10’ (or the result of some other/multiple calculations).
I tried to do this with the ‘Includes’ and also the ‘Equality’ operator, but it doesn’t seem to work for multiple numbers.
Does anyone know of an operator that will work on a list, to tell if a given index/number is within a another set of numbers?
Thanks! Gave it a go, but it doesn’t seem to be producing output for the matching numbers… any idea why? The data seems to be the same types as your example…
This solution does work to tell if a member is in a given set of numbers… however, I need to produce a list of basically ‘True/False’ of whether or not the number is in the index set, for the entire original set.
So in the above example, I’d like to compare the List Indices to the gene pool, and generate a full list of the indices with ‘True/False’ if they are or aren’t in the gene pool. So the result above would be all False with indices 2, 5, and 10 set to True…
Trying to think of how to do this… do you have any ideas? Is there a way to construct a domain and then have it replace numbers
Ah thanks, this is good! I’m a programmer, but haven’t gotten into scripting in grasshopper yet. Thanks for the introduction… way easier to implement some of these approaches this way Cheers