> > data/metadata being a rank1/list array whose length is +/@:(*/&>)
> > boxed/meta shape

> How would this be better than a rank 1 list of boxed arrays?

Avoiding fills avoids having to interpret all fills.

The advantage of your 1 fill is that it permits item count calculation through 
*/
The disadvantage is that a shape 4 1 might be a frequently enough used shape, 
when you want to append to it.  (inverted tables for an integer field would use 
an (item,1) shape.

The advantage of 0 fill is that an (x,0) shape is not super useful (except i.0 
0 can be used to append in table form)

A _ fill is another option if 0 could create a limitation.


But then boxed format keeps your advantage of */ count, without the downside of 
cleaning/interpreting fills vs intentional values step(s).

On Thursday, March 3, 2022, 03:48:54 p.m. EST, Raul Miller 
<rauldmil...@gmail.com> wrote: 





On Thu, Mar 3, 2022 at 3:28 PM 'Pascal Jasmin' via Programming
<programm...@jsoftware.com> wrote:
> I understand your metashape and data concept to be (using my prior
> example):
>
> (3 2 2 ,: 4 1 1) $ i.16
>
> would let code know that there are 12 items in 1st array, and 4 in 2nd.

That example matches how I am currently thinking about this, yes.

> And then I understand your metarank concept would be the way to tell
> if that 2nd array's shape is 4 vs 4 1 1.  A list equal to items in
> "metashape" might be what you meant?

My thinking is that the metashape would be a matrix, which would mean
that each row would have to contain the same number of elements.

However, it would be a sparse matrix (meaning that the 1s in the shape
would be represented implicitly and would appear as fill, in
operations on the metashape).

> It would seem like boxed shapes would provide the same information with

I am sure that a boxed representation could represent the same
information, but boxes are irregular -- so it does not make sense to
me to introduce a higher degree of regularity using boxes as the core
data model.

> data/metadata being a rank1/list array whose length is +/@:(*/&>)
> boxed/meta shape

How would this be better than a rank 1 list of boxed arrays?


Thanks,

--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to