Efficiency is usually not the main concern when generating 
the identity matrix.  You'd run out of space well before 
the time would matter.

I myself prefer the really short methods, for example, [EMAIL PROTECTED]



----- Original Message ----- 
From: "R.E. Boss" <[EMAIL PROTECTED]>
To: "'Programming forum'" <[email protected]>
Sent: Thursday, March 23, 2006 8:23 AM
Subject: RE: [Jprogramming] monad e.

Your method seems to be equivalent to I3a in
http://www.jsoftware.com/jwiki/Essays/Identity_Matrix but nothing is said
there about performance. 

R.E. Boss



-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Devon McCormick
Verzonden: donderdag 23 maart 2006 17:05
Aan: Programming forum
Onderwerp: Re: [Jprogramming] monad e.

I use the following to produce an identity matrix because it's faster:
idMat=: 2&$ $ ([: >: ]) {. 1"_
which is a tacit version of
idMat=: 3 : '(2$y.)$(>:y.){.1'

Can't say I've ever used monadic e. but I like Oleg's pictures.

On 3/22/06, Henry Rich <[EMAIL PROTECTED]> wrote:
>
> Except for e. i. n to produce an identity matrix, has anybody
> ever used monad e. ?
>
> Henry Rich


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

Reply via email to