Many thanks to everyone for the huge help on the outer products problem.
I've run the various solutions on some of my data.  R.E. Boss's is the clear
winner.  I've also included timings from some Matlab code for comparison.  I
did notice the timings fluctuating a bit and I suspect Raul's, Roger's, and
Oleg's versions might converge on roughly the same time.  Unfortunately,
while Brian's approach gave comparable timing results to that of R.E. Boss,
it doesn't scale to the size of vector I'm using.


   $T
61683
   W
276
   
NB. R.E. Boss
    ts 'W REB T'
2.33526 1.07454e9

NB. Matlab
    Elapsed time: 
60.2370

NB. Raul Miller
   ts 'W RM T'
107.119 3.67904e6

NB. Roger Hui
    ts '(1+61683-276) %~ > ((*/|.)@[ + ])&.> / (276 <\ T),<0'
110.137 2.57786e8

NB. Oleg Kobchenko
    ts 'W OK T'
113.35 5.36872e8

NB. Ronan Reilly
   ts 'W RR T'
132.914 3.6768e6

NB. Brian Schott
   ts 'W BS T'
|limit error: BS
|   (,~x)$(/:@;@([:</.i.)@,~x){;<@(%&(1+x-~#y))@((1+x-~#y)+/\])/.    (*"0
1|.)y


--
Professor Ronan Reilly
Department of Computer Science
NUI Maynooth
Maynooth
Co. Kildare
IRELAND

t: +353-1-7083846
e: [EMAIL PROTECTED]
w: http://www.cs.nuim.ie; http://cortex.cs.nuim.ie



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

Reply via email to