Ragged Arrays


I was wondering why the package RaggedArrays.jl
has not been updated since ages. Is there a good alternative?


@mbauman would have to answer but I would imagine that it’s because there wasn’t that much demand for the functionality. I’m guessing that a vector of vectors is usually a pretty good representation of ragged array data which doesn’t require a package.


Yeah, as I note in the first sentence of the Readme, it was predominantly an experiment to see if it was possible in the first place. The answer is kinda, but it’s awkward and there’s not much demand. Were I to do it again, I don’t think I’d make it an AbstractArray. You simply aren’t able to use it within generic functions since, well, the assumption that things are rectangular is so thoroughly entrenched that you don’t get much of anything for free. I managed to code it up in a way that threw errors in such cases (in some ancient version of Julia), but it really just needs a whole lot of work to re-implement lots of functions for the particular ragged structure.

You can take a look a RecursiveArrayTools to make working with vectors of vectors a bit easier.



Thank you for your detailed explanations.


If you want a RaggedMatrix I could move it out of ApproxFun. This has a different setup as the raggedness is interpreted as a sparsity pattern: indexing out of the ragged edges gives a zero instead of a bounds error. This works better as an AbstractMatrix.


Oh…thank you very much!

It could be of interest to others than me as well. I can work without it for now though but would use it if made available.

It is up to you, you have a lot to do with ApproxFun already…