I want to iterate the indices for an array slice according to an arbitrary SliceInfo, possibly in "reverse" order.
Given an ndarray (let's say 2D, for simplicity) I want to be able to specify a SliceInfo such as s![5..10, 10..20;-1] and have an iteration of IndicesIter<Ix2> giving me:
(5,19), (5,18), ... (5,10), (6,19) ... (6,10) ...
where the outer dimension runs forwards, and the inner dimension runs in reverse.
I can specify this in the s! macro and the generated SliceInfo instance contains the negative step, but there seem no way at all to coerce the library to iterate the indices in that order.
If I apply the slice to an array:
arr.slice(s![5..10, 10..20;-1])
Then I get the slice, with elements running "in reverse" according to the slice, but their indices are of course running "forwards" from 0. This is expected, and what I want is another API for just iterating the indices as they would appear in the original (un-sliced) array, but there appears to just be no API for this. I hope I'm wrong.