Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uupsi!kepler1!rjfrey From: rjfrey@kepler.com (Robert J Frey) Newsgroups: comp.lang.apl Subject: Re: WANTED: a way to sort array so each column i Message-ID: <567@kepler1.kepler.com> Date: 22 Apr 91 21:15:06 GMT References: <1991Apr17.151913.4891@csrd.uiuc.edu> <1991Apr19.145007.2201@csrd.uiuc.edu> Reply-To: rjfrey@kepler1.UUCP (Robert J Frey) Organization: Kepler Financial Management, Ltd., Setauket, NY. Lines: 18 In article <1991Apr19.145007.2201@csrd.uiuc.edu> jaxon@sp27.csrd.uiuc.edu (Greg P. Jaxon) writes: > >Robert Frey suggests: >> A[; grdn rotate A] (surely you mean transpose, not rotate/reverse) >I'm not sure about the last one, but in either case one permutation >vector is being applied to all the columns, the question asks for >the columns to be individually sorted so that each one is in descending >order. > Hmmm! You sure *are* right; I did mean transpose. As for the original question, I did interpet it to mean sorting the columns as entities, and rereading it, it still looks like it could be taken that way. Your statement "... the columns to be individually sorted ..." isn't ambiguous, though. Without a rank operator or a very general axis "operator" I don't see how most APL's could avoid breaking the array into separate columns, at least implicitly as in "SORTED_ARRAY assign mix[0.1] sort foreach split[1] ARRAY" where the "sort" function is defined in the obvious way.