I agree that function rank should be dealt
with separately from array rank when the latter
is well established.
In the new phrasing, word "subarray" is suspicious.
Orthodox programmers may think of the following as
subarray, which is definitely not a cell:
i.4 5
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
2 3{.i.4 5
0 1 2
5 6 7
The same as the following is substring -- everybody
calls it that:
(,:2 3) ];.0 'abcdefg'
cde
In C literature array-element arrays are called
arrays of arrays.
Also in the paragraphs, a C array is given and then
described in J terms. It might be good first to describe
it in C terms: dimensions, k-dimentional arrays, row major,
members, scalars, etc. I don't think "suffix" is a C word.
Maybe inner and outer dimensions, corresponding in layers
of loops when traversed.
And then show a J array declaration
q=: 4 5 6 $ 0
And symmetrically describe it J terms.
Thus they will have full correspondence.
Note: in C, which only has 1-dimensional arrays really,
array items are called elements, even though they
may be arrays.
So in J to indicate that rank-0 elements
are really meant they should be called atoms.
However, elements are still used mostly (or even
exclusively) to indicate atoms. Esp. in phrases
for better English
two-element list -- not two-item list
two-elemet vector -- not two-atom vector
Note the result below is not called element,
it is called "selection".
(<1 2){i.2 3 4
20 21 22 23
--- Henry Rich <[EMAIL PROTECTED]> wrote:
> It is true that a verb with rank k will not be applied to
> k-cells if the rank of the noun is less than k (this is
> obvious when k is infinite).
>
> My approach was to define k-cell talking about nouns
> only. Later, when verb rank is introduced, I point out
> that if the verb rank is greater than the operand rank,
> it applies to the operand in toto.
>
> Terrence hasn't gotten that far yet, and I guess I shouldn't
> be talking so much about operating on the nouns in this section.
> And Oleg is right that 'elements' is a bad choice of words.
>
>
>
> So, I propose the following wording:
>
>
> A rank 3 array of shape 4 5 6 such as the one defined in C by
> the declaration
> int q[4][5][6];
> can be thought of as an array of 4 subarrays, each with rank
> 2 and shape 5 6, or as a 4×5 array of subarrays, each with
> rank 1 and shape 6, or as a 4×5×6 array of rank 0 atoms.
> One of these subarrays is called a cell. As seen in the
> example above, the axes of a cell are a suffix of the axes
> of the entire array. A cell of rank k is called a k-cell:
> a 0-cell is an atom, a 1-cell is a subarray of rank 1,
> a 2-cell is a subarray of rank 2, and so on.
>
>
> Henry Rich
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Raul Miller
> > Sent: Tuesday, April 03, 2007 5:02 PM
> > To: General forum
> > Subject: Re: [Jgeneral] "J for C programmers" editorial corrections
> >
> > On 4/3/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
> > > < quote
> > href=http://www.jsoftware.com/help/jforc/declarations.htm#_Toc
> > 141157971
> > > >
> > > The term cell is used to indicate the rank of the elements that will
> > > be operated on. A 0-cell is an atom, a 1-cell is an element of rank
> > > 1, a 2-cell is an element of rank 2, and so on.
> > > < / quote >
> >
> > Er... Henry -- those are your words. Could you weigh in here?
> >
> > Thanks,
> >
> > --
> > Raul
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm