I think this sort of thing is usually called a "ragged array", you might 
find more use cases, examples, etc., googling for that term.

+1 on having a package for this, Array{Array{T}} often feels very awkward.

On Tuesday, September 2, 2014 9:03:56 AM UTC-7, Reid Atcheson wrote:
>
> A common situation I run into in my finite element codes is the need to 
> have offset indexed arrays. This can happen if a mesh consists of both 
> straight-edges and curved edges triangles, then the offsets effectively 
> tell you how many vertices are used in the representation of the curves and 
> you can then interpolate them as you like. It also arises in the situation 
> of "p"- adaptive finite elements, where the polynomial order may be 
> variable over the domain.
>
> In both of these situations it is desirable to maintain data contiguity 
> because in the end things will be passed to many "black-box" linear algebra 
> routines which often have as an implicit assumption that the data is 
> contiguous in memory.
>
> I have created a simple library for handling this situation here:
>
> https://github.com/ReidAtcheson/NonuniformArray.jl
>
> Is there perhaps a more appropriate way to handle this that I am unaware 
> of? Would others find this kind of library useful, and if so perhaps know 
> how it could be "canonicalized" to behave in a more proper Julia way (if it 
> does not already).
>
>
> Thank you,
>
>
> -Reid
>

Reply via email to