08-07-2015 09:35 AM
Hey I have a boolean array with 500,000 values and I need to find the only one thats true. Is there an easy way to find this value?
Thanks
08-07-2015 09:40 AM
Search 1D Array works fine with boolean arrays.
08-07-2015 09:40 AM
Search array?
Do you just want to find it (get the index) or do you also need to verify that there is only one?
08-07-2015 09:41 AM
@Neil_Helsel wrote:
Hey I have a boolean array with 500,000 values and I need to find the only one thats true. Is there an easy way to find this value?
Thanks
I don't understand this question.
Use boolean logic.
Or do you actually need the index of the value that is TRUE.
08-07-2015 09:45 AM
So far we assumed that you have a 1D array (you did not say!)
(In the more general case, this idea would help too, but it does not seem to get a lot of love. 😉 Only 16 kudos 😞 )
08-07-2015 09:48 AM
Define "find the only one that's true"
Does that mean detect that there is a true in the array? Or you want to know the location of the true in the array? Are you searching a 1d array?
Search 1d array on the array pallet if you want to know the location if it is a 1d array.
Or Array elements if you just want to know if there is a true value in the array.