u/\.&|.s is probably more efficient. s=:i.1000 2
ts'plus/@:|.\ s' 0.42737873 38976 ts'plus/\.&.|. s' 0.00062138806 18496 R.E. Boss > -----Oorspronkelijk bericht----- > Van: [email protected] [mailto:programming- > [email protected]] Namens Graham Parkhouse > Verzonden: woensdag 3 maart 2010 11:39 > Aan: [email protected] > Onderwerp: [Jprogramming] Efficiency of u/@:|.\ > > I have a matrix S of n vectors, s0, s1, s2 etc and a verb u with which I > can > build a matrix T of n vectors, t0, t1, t2 etc by the following procedure: > > t0=: s0 > t1=: s1 u t0 > t2=: s2 u t1 etc > > T=: u/@:|.\S will do it, but will the interpreter recognize the quick > way > of doing u/@:|.\ (for any verb u)? > > The problem I have described is very common in engineering. I've always > used > a loop before and am now aiming for something tidier. But will it be > efficient? > > Regards > > Graham > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
