Shifting positions of values in arrays
I need to replicate some functionality in existing IDL (Interactive Data Language) code. This language has some very high level constructs for moving values in arrays. This statement:
shifted_array = shift(my_array, xshift, yshift)
shift all the values in my_array in the x direction by xshift and all the values in the y direction by yshift (and wraps the values around) and puts them in shifted_array.
How would I best implement this in Java? That is, do it row-by-row / column-by-column / element-element? If so, does anybody have such code already? If not, is there some 'higher-level' way to do this? or use some other data structure?
Message was edited by:
allelopath

