Raul Miller-4 wrote:
> 
> [...]
> 
> The first norm operation can be accomplished with
>   [EMAIL PROTECTED]:]`_1:`]}~ mat
> 
> The recurrence relationship can be accomplished with
>    (] , [EMAIL PROTECTED])/
> 
> But you need to ensure that the right argument has a rank of 2, and the
> you will start with a rank 1 right argument.  While there should be more
> elegant ways of turning the initial vector into a "row vector", this will
> do:
>    ,:^:(2 - [EMAIL PROTECTED])
> 
> Thus, I should have posted something like
>    GS3=: [:   ((] , [EMAIL PROTECTED]) ,:^:(2 - [EMAIL PROTECTED]))/   [EMAIL 
> PROTECTED]:@]`_1:`]}~
> 
That is a nice line. 

Now GS@|. and GS3 seem to be bit-equivalent.

These two moves of changing the last vector and checking whether
the right argument is a matrix (which it always is except for the last
vector)
are new to me.

Thanks.

-- 
View this message in context: 
http://www.nabble.com/reduce-fold-in-J-as-an-adverb-or-conjuction-tf4839217s24193.html#a13864505
Sent from the J General mailing list archive at Nabble.com.

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

Reply via email to