Hi Tim, Indeed, ChainedVectors is an excellent start. It implements the desired functionality but purely for vectors. What I am looking for could be called ChainedMatrices.
Thanks for the tip. Best Regards, Jan Dňa utorok, 17. marca 2015 11:49:55 UTC+1 Tim Holy napísal(-a): > > Not currently, but you can create your own new AbstractArray types. In > this > case, https://github.com/tanmaykm/ChainedVectors.jl > might be a good model for how to proceed. > > Best, > --Tim > > On Tuesday, March 17, 2015 01:35:03 AM Ján Dolinský wrote: > > Hi, > > > > Is it possible to create a view which refers to e.g. two different > matrices > > ? I am on Julia v0.36. > > > > X = rand(1000,1000) > > Y = rand(1000,100) > > > > @time a = view(X, :, :) > > elapsed time: 6.576e-6 seconds (184 bytes allocated) > > > > @time b = view(Y, :, :) > > elapsed time: 5.83e-6 seconds (168 bytes allocated) > > > > @time c = [a b] > > elapsed time: 0.080207052 seconds (8802560 bytes allocated) > > > > a and b are apparently "views" and little memory is allocated. Is it > > possible to create a composite view which refers to X and Y at the same > > time ? Expression "[a b]" seems to create a copy of X and Y. > > > > My motivation is that I am concatenating two matrices in a loop where > the > > first one is usually fixed and the other one may have different number > of > > columns at each iteration. > > > > Thanks, > > Jan > >
