On Sunday, February 14, 2016 12:55:42 AM Greg Plowman wrote: > No, not "Cartesian" offsets, but "linear" offsets transformed to Cartesian > equivalent. > That's why I think I need the dimensions of the parent range.
You can't do that in general with a cartesian iterator using Julia's for-loop syntax. Consider the case where you're iterating over a 5x5 domain, and your starting index is 7. You can, however, do this manually using start, done, and next. > As you point out, R here is effectively an empty iterator. > However for my use, that same range R could be non-empty if it is a > sub-range of a larger enclosing range. > Say CartesianSubRange(CartesianRange((8,8,8)), I1, I2)) > So I want to iterate within the parent CartesianRange dimensions, from I1 > to I2. I guess I don't understand. Can you be explicit about what range that would actually produce? I suspect that you're not interpreting I2 as the "stop index" but as something else, but I am not having much luck guessing what that is. Best, --Tim
