See the following (J4.05) http://www.jsoftware.com/help/release/iamend.htm There is a link to it from Appendix B of the dictionary.
----- Original Message ----- From: Raul Miller <[EMAIL PROTECTED]> Date: Wednesday, October 8, 2008 14:40 Subject: Re: [Jprogramming] Performance of amend To: Programming forum <[email protected]> > On Wed, Oct 8, 2008 at 4:40 PM, Sherlock, Ric > <[EMAIL PROTECTED]> wrote: > > Nevertheless I'm inclined towards the amend method for its > conciseness> and because in my mind it mirrors the crossing over > process better. > > Personally, I would use a different numeric approach, and I would > be inclined to give it a name: > > old=: i.5000 4000 > new=: -old > loc=: 0.7 > ($old)[EMAIL PROTECTED] > upd=: 1 :(':';'y + m*x-y') > ts=:6!:2,7!:[EMAIL PROTECTED] > 10 ts'(old&*@:-. + new&* ) loc' > 0.475871 4.02655e8 > 10 ts'loc}old,:new' > 0.575763 6.7109e8 > 10 ts'new loc upd old' > 0.430165 4.02656e8 > (new loc upd old) -: loc}old,:new > 1 > > The expression old + loc * new-old isn't that complicated, > but perhaps Roger will modify the interpreter's treatment > of loc}old,:new to avoid having to buld old,:new? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
