I played with this a little while ago. It's simplest if you can manage to always concatenate along a *new* dimension. Otherwise I think you'll have to do a lot of bookkeeping to track when to index into which array. Here's a very minimal starting point (requires 0.4) that requires all arrays be the same size and stacks them along a new (inserted) dimension: https://gist.github.com/mbauman/9d68a3d84545adece4c5
On Friday, July 3, 2015 at 8:34:35 PM UTC-4, Tim Holy wrote: > > Closest I know of is https://github.com/tanmaykm/ChainedVectors.jl > > --Tim > > On Friday, July 03, 2015 01:06:31 PM Tom Breloff wrote: > > I'm interested in being able to do zero-copy concatenation of > > AbstractArrays, with something similar to ArrayViews, but in reverse: > > > > x = rand(4,2) > > y = rand(4,2) > > z = hcatview(x,y) # "view" that is able to index into hcat(x,y) without > > creating the temporary matrix > > x[1,1] = 10.0 > > @assert z[1,1] == x[1,1] > > > > Does this exist already somewhere? If I was to build it, should I > submit a > > PR to somewhere (ArrayViews?) or start a new package? > > > > One of many uses is to generate a large block matrix, potentially > composed > > of both dense and sparse matrices. Bonus points if I can get a > > ContiguousView when "view(z, 1:3, 4:5)" refers to a range that is > totally > > encapsulated by a dense child matrix. > >
