Newsgroups: comp.lang.apl Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!jtsv16!blister!itcyyz!yrloc!rbe From: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) Subject: Re: WANTED: a way to sort array so each column i Message-ID: <1991Apr19.193342.20318@yrloc.ipsa.reuter.COM> Reply-To: rbe@yrloc.ipsa.reuter.COM (Robert Bernecky) Organization: I P Sharp Associates, Toronto References: <31931@usc> <13APR91.22583472@uc780.umd.edu> <14APR91.18400456@uc780.umd.edu> <1991Apr17.151913.4891@csrd.uiuc.edu> Date: Fri, 19 Apr 91 19:33:42 GMT In article <1991Apr17.151913.4891@csrd.uiuc.edu> jaxon@sp27.csrd.uiuc.edu (Greg P. Jaxon) writes: >cs450a03@uc780.umd.edu writes: > >>>Incidentally, how does one write this function in APL2? >> you could write a function F to sort vector >>then do: >> transpose mix F each split[quadIO] array >>You might be able to do something with mix and brackets to avoid the >>transpose, but I don't know what exactly, off the top of my head. >>Raul Rockwell > This seems to reflect the basic difference in theology between APL2 and the SHARP APL/J world: APL2 uses split or partitioned enclose to create an array of arrays, applies some operation at one level down to each of those results, then uses mix or disclose to restore the data to its original depth. J and SAPL consider the operation to be defined on arrays of some particular rank, and then extends to higher rank arrays in a uniform manner. The Rank conjunction is used with these operations, when needed, to modidy that behavior. Effectively, J applies a different operation to the same data. APL2 applies the same function to different data. I believe that J is going to be easier to optimize for better performance in this area, having done some of that optimization for SHARP APL in the dim past. Robert Bernecky rbe@yrloc.ipsa.reuter.com bernecky@itrchq.itrc.on.ca Snake Island Research Inc (416) 368-6944 FAX: (416) 360-4694 18 Fifth Street, Ward's Island Toronto, Ontario M5J 2B9 Canada