I'm kind of curious what the use case is. How are you using CartesianRanges?
On Thu, Feb 11, 2016 at 9:00 PM, Greg Plowman <greg_plow...@yahoo.com.au> wrote: > Suppose I have a CartesianRange and want to access a sub-range. > > start = CartesianIndex((1,1,1)) > stop = CartesianIndex((5,5,5)) > cr = CartesianRange{start, stop) > > > Something like: > sub_cr = SubCartesianRange(cr,x,y) where x,y are arbitrary > CartesianIndexes within cr. > > > then I could do > > for a in sub_cr > ... > end > > length(sub_cr) > > etc. > > I note that constructing CartesianRange(x,y) is valid code, but won't > work because, we need to somehow embed start, stop into the sub-range. > Also, it is possible for some x[i] > y[i], and I think the logic for > CartesianRanges requires x[i] <= y[i] for all i. > > Is there something for sub-ranges like this already? > >