On 4/17/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
well if you type
{ b . 0
into the interpreter you get out
_ 1 0 and so monadic rank is infinite, left rank is 1, right rank is 0
I get
{ b. 0
1 0 _
> I'd make that ,2 for my left frame, but yeah.
What does ,2 do? Create a rank-1 array?
Yes.
> > common frame is empty
>
> In other words, you can basically ignore rank when figuring
> out the results of this operation.
"J for C" never taught to ignore rank or frames. In this section
http://www.jsoftware.com/help/jforc/loopless_code_i_verbs_have_r.htm#_Toc141157994
it is stated that "J requires that one of the frames be a prefix of the other"
so is an empty list a prefix of the list consisting of 2? It has to be
or things wont work.
So the common frame is "" which means empty list in J.
the length of the common frame is 0
Ok, sure, if you prefer you can prefix the shape of the result with
empty, instead of basically ignoring that empty shape.
So, for the right operand the 0 cells are exactly the rank to be
operated on. While each 0 cell on the left contains multiple operand
cells... or at least it should, per the book. So I am confused on the
left and right ("Clowns to the left of me... jokers to the right...
here I am stuck in the middle with verb...")
(1) the right operand is a rank-1 array.How are 0 cells exactly the
rank to be operated on?
(2) the left operand is a rank-1 array. How does it contain multiple
operand cells?
You have two rank 0 cells, but they are in the left argument, not the right:
2
4
You have one rank 1 cell for the right argument:
3 1 4 1 5 9
I'm suspicious of this advice :) I should be able to use J's implicit
looping and framing to figure out how this thing works.
Ok... but if you're stuck, you might want to check the official
reference documentation:
http://www.jsoftware.com/help/dictionary/intro20.htm
(linked from http://www.jsoftware.com/help/dictionary/contents.htm)
or maybe other sources
http://en.wikipedia.org/wiki/J_programming_language_rank
Or, ok, asking questions is perhaps the best idea...
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm