Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ncar!noao!arizona!amethyst!math.arizona.edu!weg From: weg@convx1.ccit.arizona.edu (Eythan Weg) Newsgroups: comp.lang.apl Subject: Re: WANTED: a way to sort array so each column i Message-ID: Date: 17 Apr 91 20:02:50 GMT References: <31931@usc> <13APR91.22583472@uc780.umd.edu> <14APR91.18400456@uc780.umd.edu> <1991Apr17.151913.4891@csrd.uiuc.edu> Sender: news@amethyst.math.arizona.edu Organization: University of Arizona, Economics Dept. Lines: 30 In-reply-to: jaxon@sp27.csrd.uiuc.edu's message of 17 Apr 91 15:19:13 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 Easy mix[K] is the left inverse of split[K], so just mix[#IO] F" split[#IO] A. Greg Jaxon Is this solution correct? Don't you have to insert a new first dimension and therefore the axis for mix should be fractional? Underlying my original question regarding the APL2 method is the sense that you often need auxiliary functions where in J you can do without. Is this a general feeling? Now often you need a subroutine that in J can be part of a main verb, not cluttering the workspace. It pleases me aesthetically that you can work this way. I wonder if using internal or external subroutines have different implications regarding performance. Eythan Weg