From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.167.66 with SMTP id e63mr3252994ywh.3.1478974606961; Sat, 12 Nov 2016 10:16:46 -0800 (PST) X-Received: by 10.157.18.211 with SMTP id g77mr264769otg.14.1478974606885; Sat, 12 Nov 2016 10:16:46 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!1.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!p16no844824qta.1!news-out.google.com!c26ni660itd.0!nntp.google.com!q124no1051680itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 12 Nov 2016 10:16:46 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=156.67.139.171; posting-account=3Fg1FgoAAACfsmWScNfMD1tGFhR4DU0o NNTP-Posting-Host: 156.67.139.171 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: matrix manipulation From: hnptz@yahoo.de Injection-Date: Sat, 12 Nov 2016 18:16:46 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:32291 Date: 2016-11-12T10:16:46-08:00 List-Id: What is an elegant way to program exchange of columns in a matrix. Application: C is a matrix. Cj be the j-th column of C. Sort C1,C2, ..., Cn in non increasing order with respect to their first component. I tried and ended up in a very messy program, as I had to sort the first components first, remember their new index and then reconstruct the matrix.