Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!ni.umd.edu!uc780.umd.edu!cs450a03 From: cs450a03@uc780.umd.edu Newsgroups: comp.lang.apl Subject: RE: WANTED: a way to sort array so each column i Message-ID: <14APR91.18400456@uc780.umd.edu> Date: 14 Apr 91 18:40:04 GMT References: <31931@usc> <13APR91.22583472@uc780.umd.edu> Sender: usenet@ni.umd.edu (USENET News System) Organization: The University of Maryland University College Lines: 23 Nntp-Posting-Host: uc780.umd.edu Eythan Weg > A Analla >*** >*** Could some please suggest a generic function to reorder each column >*** of an array in descending order where the array is two dimensional. > [paraphrased slightly] in J, use \:"1&.|:~ array >Incidentally, how does one write this function in APL2? In APL2, you could write a function to do sorting: _ V R <- F Y _ R <- Y[gradedown Y] V 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