Is it immediately obvious to you what the following code does?
This rats nest simply swaps two elements in an array, a very common operation when trying to operate on a large array in-place. The In Place Element Structure helps the looks a little, but I find the performance to lag when used in a tight loop, you know, the kind you encounter when you are trying to operate on large arrays.
I would like a simple primitive (sorry too lazy for a picture) which simply swaps two elements in an array. It should be similar to the Replace Array Subset function, except for two sets of index inputs and no subset input. If you want to really make my day be sure to allow disabled inputs to swap rows and columns in one shot for 2D arrays, or pages or volumes or whatever in higher dimensional arrays.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.