On 4/3/07, Terrence Brannon <[EMAIL PROTECTED]> wrote:
getting solid theoretical underpinnings. I am going back through
"Declarations" and building a crib sheet (it follows). And then I will
move on with confidence through the next two sections.
- 0-cell: this *is* an atom. this is *not* an array
Er... please be careful here. Atoms are arrays. Cells
are not arrays in and of themselves (they often represent
arrays or array flavored arguments for element verbs in a derived
verb ... but I should probably leave that discussion for another
time.)
Atoms are degenerate arrays. Alternatively, arrays are full
of atoms. Atoms have no dimensions -- and this means you
can't have different rank 0 arrays with different numbers of elements
-- you always have exactly one element in a 0 cell or a rank 0 array.
But "cells" are not arrays. They are a mechanism for subdividing
an array. This becomes more clear when considering higher ranks
(see below). For the 0-cell case, it's almost a non-issue.
- 1-cell: rank-1 array, possibly containing 0 elements
A 1 cell may be a rank-1 array, or a rank-0 array.
rank=:[EMAIL PROTECTED]
rank"1 i. 3 4
1 1 1
rank"1 'a'
0
- frame: a shape which, when the shape of the n-cell is concatenated,
will yield the shape of the noun
Yes.
- negative-cell: an n-cell where abs(n) is the frame length
Close -- degenerate cases need a slightly different description.
Also, since n-cell typically indicates the maximum rank of the
cell, I'd also want to change that part of the description.
But since this is a memory aid for you, I'll leave it to you to decide
on the best description.
- If exactly one character is between the quotes, the value is an atom;
if none or more than one, the result is a list.
Yes.
- scalar == atom == rank 0 array
- shape of 0 is for an array. an atom's shape is an empty list
I can't quite parse "shape of 0 is for an array", but you seem to
have the basic idea.
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm