Is there a simple algorithm to iterate over all the elements in an array given a constant stride?
I am currently using a circularly linked list to popluate a temporary array with indecies to of the actual array by traversing through the linked list (stride) and then removing the node from the linked list and placing the node’s value into the temporary array. this repeats until there is no more links left.
This temporary array of indecies is then used to popluate an new array with the values from the original array given the temporary array’s values as indecies.
This method works, however is it very slow… is there a faster way? i.e. is there a mathematical formula i can use to generate the next index in the sequence?
Now thats a real humdinger of a problem. Have you considered storing a wrapping object in the array instead of the actual object with a indicator as to whether it’s been used this time (obviously it wouldn’t be thread safe).
