I have a programming problem I'm unsure how to solve.
I have two arrays and a function. The function works on array1 on a given range. Array2 contains ranges in array1 that are forbidden to be worked on.

@matrix Best solution probably depends on the language.

You can mask off the values in array1 before calling the function, and that's my first guess.

If your function operates element-wise, you can check each element of array1 for not being in array2 right before you pass each element to the function. This won't work if the array structure is meaningful as anything other than a container for your elements, though.
Follow

@ceo_of_monoeye_dating I'm working in C.
The array structure is meaningful so I can't touch either of the arrays.

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.