I have a very large array (1D, 1-billion cells), let’s call it bigArray. I want to update roughly 1000 cells and set their values. That is, I have a second array, called smallArray, which looks something like:
I want to update the values of bigArray only at the 1000 or so positions referenced in smallArray and set them to the corresponding value specified in smallArray. That is, after the update bigArray will be unchaged except that element 1022 will be set to 32, element 3242342 will be set to 0, element 3342411 will be set to 22 and so on.
How can I do this?