> Roger, can you shed any light?
The current choice of the monad u;.0 is minor as
it is just one instance of a more general dyadic case.
I don't know why Ken made this choice (reversing
each axis). Perhaps it was motivated by something
from tensor analysis.
----- Original Message -----
From: Dan Bron <
j@...>
Date: Friday, June 20, 2008 14:16
Subject: RE: [Jprogramming] Apply to all axis
To: Programming forum <
programming@...>
> RE Boss asked:
> > why "reversing y along each axis" was
> > introduced in defining ;.0
>
> My quick search didn't turn up a rationale, but in response to
> your (RE Boss') "Reversing all ranks" thread, which I linked to
> earlier, Roger had this to say:
>
> Ken told me that sometimes, when
> he came up with a neat
> solution to a problem, he'd be
> accused of putting in
> a special construct in the
> language just for that problem.
> (And that was why the solution
> was so neat.) But the
> accusation lost its sting when it
> was repeated in problem
> after problem, in multiple
> diverse fields.
>
> (From
>
http://www.jsoftware.com/pipermail/programming/2005-December/000322.html )
>
> As I read it, it was posted more-or-less in defense of the
> definition of ;.0 , so maybe Ken saw this (reversing
> all ranks) as a recurring problem. Roger, can you shed any
> light?
> Actually, RE Boss, maybe you can. You started that thread
> by asking for a replacement for |."3@:(|."2)@:(|."1)
> . Do you remember why you wanted to do that? I
> personally have not seen this problem recur in field after field.
>
> In fact, after some research earlier today, it seems the
> recurring "all ranks" problem is in fact the one that started
> this thread: padding an array on all dimensions.
> Trimming (the opposite of padding) an array on all dimensions
> came in second.
>
> -Dan
>
> PS: I don't remember ever wanting to "reverse all ranks",
> but I have wanted an "alternating reversal" sometimes.
> That is, I wanted to reverse every other item of an array.
> One of my prouder J moments was discovering (A."_1~
> _2 | i.@:#) for this purpose. There are other ways, too:
>
>
>
http://www.jsoftware.com/pipermail/programming/2006-November/004198.html----------------------------------------------------------------------
For information about J forums see
http://www.jsoftware.com/forums.htm