Normally, I would normalize into a broader view of the topic:  Shift into
fully associative arrays/relational model,
then "map" the sequence: look for broadly general patterns, and then fold
back in to the operational functors available
as a subset.

Whether or not bracket notation has any use in the face of any other axis
functoring becomes crystal clear at that point.

It is amazing how long the original APL spec stood up under such pressures
... and how well it serves as a basis
for the _differing_ "generalizations" of it.

Perhaps a single unifying generalization would help ...

On 6/22/06, Rob Hodgkinson <[EMAIL PROTECTED]> wrote:

In your example below of non-applicable shapes, the transpose is required
by
the APL axis operator also as you point out, as in:
   TX=. |:X
   TX ; Y : TX+"1 Y
+--------+-----+-------+
|  0 300 | 0  1|  0 301|
|100 400 | 2  3|  2 303|
|200 500 | 4  5|  4 305|
|        | 6  7|  6 307|
|        |     |       |
|        | 8  9|108 409|
|        |10 11|110 411|
|        |12 13|112 413|
|        |14 15|114 415|
|        |     |       |
|        |16 17|216 517|
|        |18 19|218 519|
|        |20 21|220 521|
|        |22 23|222 523|
+--------+-----+-------+
visually the data above is 'aligned' to add as we want - and now this is
the
same model as the original example.

This is an example where I would stop and ask if X has been created with
the
wrong shape and it might be better to set it up originally as shape 3 2,
then the transpose would never have been necessary.

I can't see how the axis operator could have done the above without the
transpose either, but better to review/revise the data model to avoid it
in
both cases.

Note re your last example referring to this same data:
   (X+"0 3 Y) -: (X+/Y)
1

and your more complicated examples in your message, such as:
   $(i.5 4,3   6) +"1"2 3 i.5,3 2   6
5 4 3 2 6
... I don't believe are possible with the Axis Operator, but would
likewise
be glad to be shown a solution, as also for an Axis example that can not
be
reproduced using Rank with no transpose.  I can't think of one.

Regards, Rob Hodgkinson

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Oleg Kobchenko
Sent: Thursday, 22 June 2006 6:45 PM
To: Programming forum
Subject: Re: [Jprogramming] Fwd: Axis specification in APL2

<...snip>

Here's an example of non-applicable shapes:

   X=. 100*i.2 3
   Y=. i.3 4 2
   X ; Y ; (|:X) +"1 Y
+-----------+-----+-------+
|  0 100 200| 0  1|  0 301|
|300 400 500| 2  3|  2 303|
|           | 4  5|  4 305|
|           | 6  7|  6 307|
|           |     |       |
|           | 8  9|108 409|
|           |10 11|110 411|
|           |12 13|112 413|
|           |14 15|114 415|
|           |     |       |
|           |16 17|216 517|
|           |18 19|218 519|
|           |20 21|220 521|
|           |22 23|222 523|
+-----------+-----+-------+

it not possible to get the result above with
rank only without transpose,
although, it is possible to match + in a way
   $X +"0 3 Y
2 3 3 4 2
Can either of the two examples above be done
with axis +[? ?]  without transpose?

Can somebody provide an axis example,
that really cannot be done with rank alone?

<snip>


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




--
--
Roy A. Crabtree
UNC '76 gaa.lifer#11086
Room 207 Studio Plus
123 East McCullough Drive
Charlotte, NC 28262-3306
336-340-1304 (office/home/cell/vmail)
704-510-0108x7404 (voicemail residence)

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.authorsden.com/royacrabtree
http://skyscraper.fortunecity.com/activex/720/resume/full.doc
--
(c) RAC/IP, ARE,PRO,PAST
(Copyright) Roy Andrew Crabtree/In Perpetuity
   All Rights/Reserved Explicitly
   Public Reuse Only
   Profits Always Safe Traded
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to