Definitely possible, but it would take some work. But keep in mind: 9!:14'' j701/2011-01-10/11:25
J801 is still using the instance of J from three years ago. It's open source now, which currently means (a) it's very stable, but (b) the community needs to start contributing back. Personally, I have some other things I want to be doing before I start mucking around in the interpreter. Also, keep in mind that the advantage of sparse arrays is their lack of generality. Once you start boxing them, you heading in the direction of making them general, and that has all sorts of implications. But do not let us hold you back from trying it yourself. Thanks, -- Raul On Thu, Feb 27, 2014 at 11:39 AM, Pascal Jasmin <godspiral2...@yahoo.ca> wrote: > One good application of sparse arrays is tracking differences in a large (or > medium) datasets. Its possible for 1 billion rows to only have a few dozen > fields that have changed in the last period. Sparse arrays are also good for > preparing mass updates to a dataset, for example by applying the above small > differences sparse set to the large dataset with sparse_differences + data. > > Once you start think that way, its easy to imagine that you might want to > work with a list of such differences, or store these differences with > associated data (such as differences to what and when), or pass the > differences to verbs along with other parameters (parameters separated by ; > that could include what and when). > > There is a workaround to use lr or 3!:1 to encode the sparse array, and then > box that with something else. Still, working with very sparse arrays would > be easier with allowing them to be boxed. > > On the subject of suggestions for sparse arrays, they could be made even > sparser if the fill element could apply to the full shape of the "item". For > example: > > $. 5 2 $ 0 2 > 0 1 │ 2 > 1 1 │ 2 > 2 1 │ 2 > 3 1 │ 2 > 4 1 │ 2 > > lr $. 5 2 $ 0 2 > 2 2 2 2 2 ((<"1)5 2$0 1 1 1 2 1 3 1 4 1)}1$.5 2;0 1;0+-~2 > > It could be possible that this were not a rank error: > > 1$.5 2;0 1;0 2 > > > ie. setting the fill element to be 0 2. > > The workaround for this is to have multiple parallel sparse arrays, which > brings us back to grouping them for instance through boxes. Roughly the same > pattern as inverted tables ( > http://www.jsoftware.com/jwiki/Essays/Inverted%20Table) . The analogy to > data tables is having fields with different default values, and sparse data > only storing non defaults. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm