Re: http://www.jsoftware.com/help/primer/k_cell.htm

The who section should be removed and fashioned more along
the lines of Dan Bron and Brian Schott's essay:    
   http://www.jsoftware.com/jwiki/Essays/A_Fine_Line

Now, with that in mind, I will rewrite them.

k-cell is a term used to describe how the shape of an array will be
partitioned into the frame and the cell shape. That sounded kind of
weird but just take a second to think about it. The shape of an array
is a list, right? It's a list consisting of the number of elements
along each axis. The frame is some prefix of that list. And the
difference of the array_shape and frame is the cell-shape. 

And once we have the shape of a cell, we can simply count the atoms in
that shape to get the rank.  

Now, the k in k-cell can be zero, positive or negative... you can have
2-cells and you can have _2 cells and any other integer you want. When
k is positive, it tells us the rank of the cells, when k is negative
it tells use the "rank" of the frame. Let's take a hypercube array as
an example:

hc =. i. 2 3 4 5

Now, the shape of hc is 2 3 4 5

Let's work with positive k first. k will therefore be determining the
shape and rank of the cells:

k = 4  NB. cell shape is 2 3 4 5 , frame is empty
k = 3  NB. cell shape is 2 3 4   , frame is 2
k = 2  NB. cell shape is 2 3     , frame is 2 3
k = 1  NB. cell shape is 2       , frame is 2 3 4
k = 0  NB. cell shape is empty (consists of atoms) , frame is 2 3 4 5

Let's move onto negative k. k will now determine the frame.

k = _4 NB. frame is 2 3 4 5
k = _3 NB. frame is 2 3 4
k = _2 NB. frame is 2 3
k = _1 NB. frame is 2





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

Reply via email to