On Tue, Aug 26, 2008 at 3:17 PM, Brian Schott <[EMAIL PROTECTED]> wrote:
>        I found something fishy by trimming down l to my l1
> I see there is no term that equals 0. Doesn't that seem
> incorrect?
>
>   l1=: - %"1 -/[EMAIL PROTECTED]

Actually, I think that you have identified a problem with my approach

   2 l1 1 2 3
  _ 0 0.5
  1 0   1
0.5 0  __

Note that some zeros appear off the diagonal, and I would have been
ignoring them.

A fixed version would be:
   lj=: - ((#~ 0&~:) */@:% ] #~ 0 ~: ]) "1 -/[EMAIL PROTECTED]
   L=: ({:@] +/ .* [ lj [EMAIL PROTECTED])"0 2
   Y -: X L X,:Y
1

Thanks,

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

Reply via email to