Yes, the operand-cell rank is the lesser of the verb rank and the noun rank.
(I didn't mention that because if the noun rank applies, you are by definition dealing with the operand in its entirety, and replication is of the entire operand, which is straightforward) Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Terrence Brannon > Sent: Monday, April 23, 2007 12:10 PM > To: General forum > Subject: Re: [Jgeneral] long-frame rationing when the shapes > are not equal > > On 4/22/07, Henry Rich <[EMAIL PROTECTED]> wrote: > > > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On Behalf Of > Terrence Brannon > > > Sent: Sunday, April 22, 2007 6:14 PM > > > To: General forum > > > Subject: Re: [Jgeneral] long-frame rationing when the shapes > > > are not equal > > > > > > On 4/22/07, Henry Rich <[EMAIL PROTECTED]> wrote: > > > > You are saying that long-frame rationing doesn't happen > sometimes. > > > > > > What is the precise definition of long-frame rationing? Does this > > > process ration the longer-frame noun into 0-cells always? > If not, what > > > determines what it is rationed into? > > > > 0-cells have no significance whatsoever, which I assume is the > > basis of the confusion. > > > > The rank of the cells is given by the corresponding rank of the > > verb. > > I thought that the rank of the cells was the lower of the verb rank > and the noun rank as I state here: > <quote > http://hg.metaperl.com/j?f=d739eb121368;file=doc/dyad-proc.txt > ;style=raw> > The verb will be applied to lr-cells of the left operand > and to rr-cells of the right operand. > </hr> > where lr and rr are the lesser of verb rank and noun rank. > > > The frame is then whatever is left. Cells of the > > shorter-frame operand are replicated to fill in the missing > > axes in the shorter frame. > > > > For example, if the frames are (x) 2 3 and (y) 2 3 4 5, each cell of > > x is replicated to form a 4x5 array, > > oh, in the book, the replication was of 0-cells. And I did not know > why it was 0-cells in particular. > > > which is then matched one-to-one > > with y. Note that we haven't said what the rank of a cell > of x or y is: > > that comes from the verb, and it can be anything, and not > necessarily > > the same for x and y. > > > > All this is done without knowing what the verb is. > > But the very first step in my dyad processing worksheet is to get the > verb rank and compare it with the noun rank. > > I hope this is a fair question to ask. Please make any corrections to > this that you see fit: > > J Language Dyadic Verb Processing Worksheet > =========================================== > > Write out the entire expression: > Write out the abbreviated verb rank: > Expand the verb rank(*1): > > Rank Calculation: > ---------------- > left-noun-rank: right-noun-rank: > left-verb-rank: right-verb-rank: > lesser left rank, lr = lesser right rank, rr = > > The verb will be applied to lr-cells of the left operand > and to rr-cells of the right operand. > > left-noun-shape: right-noun-shape: > > Frame Calulation(*2): > -------------------- > left-frame: lf = right-frame: rf = > > common frame: cf = > length of this common frame: rcf = > -rcf = > > Operand Pairing: > --------------- > 1. Pair by common frame consisting of (-rcf)-cells: (*3) (*4) > > 2. If the frame are empty, continue to step 3. > Pair by long-frame rationing if the frames are not empty. > Long-frame rationing algorithm: > If the frames are the same length, then you simply pair > them 1 by 1. > > 3. Look up the verb (*5) > > > Footnotes: > --------- > (*1) Expand verb rank: > v"0 1 2 has monad rank 0, dyad left rank 1, and dyad right rank 2 > v"0 1 has monad rank 1, dyad left rank 0, and dyad right rank 1 > v"1 has all ranks 1 > > Type verb b. 0 to get the rank in the interpreter. > > (*2) A frame is some prefix of a noun's shape. The frame can be > deduced if you have the cell rank (lr-cells or rr-cells). > Let's use i. 4 3 2 7 6 as our example. > > Cells Frame > ------------------------------------- > Rank | Shape Length | Value > ------------------------------------- > 0 | empty 5 | 4 3 2 7 6 (the frame = > the noun shape) > 1 | 6 4 | 4 3 2 7 > 2 | 7 6 3 | 4 3 2 > 3 | 2 7 6 2 | 4 3 > 4 | 3 2 7 6 1 | 4 > 5 | 4 3 2 7 6 0 | empty > > Note (*4) explains this a different way. > > > (*3) when rcf == 0, then logically (-rcf) == -0 == 0, but DO NOT then > conclude that you are processing on 0 cells: when rcf == 0, then > (-rcf)-cells are the operands in their entirety. > > > (*4) > A good way of thinking about frames and cells, when looking at the > shape of a noun (for example 4 3 2 7 6 ), is to put a line > somewhere in > it. > > The frame-shape is the numbers to the left of the line, and the > cell-shape is the numbers to the right. > > So, for example, a rank 2 verb will put the line 2 axes in from the > right of the shape: > > rank 2: 4 3 2 | 7 6 > > Similarly: > > rank 1: 4 3 2 7 | 6 > rank 0: 4 3 2 7 6 | > rank _: | 4 3 2 7 6 > > Now, whereas a verb with a positive rank N will put the line N axes in > from the RIGHT of the shape, a verb with negative rank -N will put the > line in N axes from the LEFT of the shape: > > rank _1: 4 | 3 2 7 6 > rank _2: 4 3 | 2 7 6 > rank __: 4 3 2 7 6 | > > So, positive ranks let you specify the rank of the CELLs on which > you'll operate; negative ranks let you specfic the rank of the FRAME > you want to produce. > > That's why we say positive ranks are absolute and negative ranks are > relative. A verb with a positive rank will never see a noun with rank > greater than that; a verb with negative rank could see a noun of an > arbitrary rank. A cute insight is that this maxim is inverted for the > infinite ranks: a verb of rank (positive) _ could see a noun of > arbitrary rank, whereas a verb of rank (negative) __ will never see a > noun larger than an atom. > > > lets say our datum =: 100 200 ... therefore the shape is 2 > ... the _1-cells result in this picture: > [18:49] metaperl_: 2 | > [18:50] metaperl_: implying what? > [18:58] DanBron: well, the thing before the | is the shape of the > frame, right? > [18:58] metaperl_: yes > [18:58] DanBron: and the thing after the | is the shape of each cell, > right? > [18:58] metaperl_: right > [18:58] DanBron: well, if there's nothing after the |, then each cell > has no shape, right? > [18:58] DanBron: what type of array in J has no shape? > [18:59] DanBron: What is $100 ? > [19:00] metaperl_: atoms > > (*5) Type the verb and hit CTRL-F1 to see it's J dictionary > definition. > > > Acknowlegements: > --------------- > Dan Bron for the method of looking at frames and cells > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
