How to efficiently identify if integer is in wave?
Wed, 03/31/2021 - 09:37 am
I have wave of integers (16 bit, random order positive integers) and I need to know if a specific integer value is already in that wave.
First I wrote function which iterates over the wave, but I nearly felt ashamed when I saw the result.
Then I used extract for points which match that integer value and checked the extracted wave length. Still, had to write user function for that.
I still feel there could be some single line solution to this simple issue which is escaping me. Any suggestions?
Thanks a lot!