it is possible to check if the elements of a spread are included or not into a second spread?
this is what I need (kind of): given A and B as spreads, I need to obtain the result of A∈B (spreads of boolean, same size as A)
(1,2,3) ∈ (4,5,6,7) = (0,0,0)
(6,4,9) ∈ (4,5,6,7) = (1,1,0)
(1,2,5) ∈ (4,5,6,7) = (0,0,1)
there is already something similar?
it looks like that the Sift (Value) is what you need.
Just plug your A spread into the Input and B spread into the Filter.
Hits output pin returns a boolean spread with the size of A.
YES! its exactly what I need!
now: what if I need it with bin-size?
What if you add a spectral boolean node (like AND (Boolean Spectral) ) after the Sift (Value)?
sift_and_bin.v4p (6.4 kB)
no, what I need to do is something like:
A∈B // C∈D // E∈F // etc etc…
PS. I don’t know before how many couple of spreads I must check!
EDIT: something like the example attached!
siftBIN.v4p (7.9 kB)
sift won’t do the job here. without specifying bin sizes on the node it doesn’t deal well with multiple entries with the same value, be it on input or filter.
it will only return the first filter index hit.
the solution is either a plugin or the ‘oldschool’ resample-your-spreads way. see attached
siftBIN.v4p (16.2 kB)
nice! thank you, I’m gonna try it
Wow, thank you Woei, the master of the bins.