Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

SparseArrays are atomic objects, but they do have a FullForm which reveals information about them.

What is the meaning of the various elements in the full form of a SparseArray? Did the structure change between Mathematica versions, and is it documented anywhere?

share|improve this question
It seems to be the same as InputForm which is mentioned: Whenever a sparse array is evaluated, it is automatically converted to an optimized standard form But it doesn't have much detalis – ssch Jan 19 at 21:34
2  
I can't tell much about the changes from version to version, but the "API" I use in many of my answers,e.g. here gives some idea. I give more details on the meaning of these parts here. – Leonid Shifrin Jan 19 at 21:48
Based on ElisionsDump`HeldSparseArrayData it looks like SparseArray[data_,dims_,def_,{___,elems_}], where dims is the dimensions and elems is number of non-default elements. I'm not sure about def and data. – Szabolcs Jan 19 at 22:50
def is the "background", or default, value. data seems always to be Automatic, and I don't know what it represents. – Oleksandr R. Jan 20 at 6:12

1 Answer

up vote 2 down vote accepted

I have described the details here and here. The second post describes the version number of the sparse array implementation, which is still at version 1. So no big changes since it's introduction and V9.

If you like to read about sparse arrays I can recommend this from Tim Davis.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.