comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Multi-column sort
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Multi-column sort [message #79492 is a reply to message #79404] Fri, 02 March 2012 04:26 Go to previous messageGo to previous message
cgguido is currently offline  cgguido
Messages: 195
Registered: August 2005
Senior Member
Firstly, sort() does not maintain the order of identical elements so I'd use bsort() which you can find online somewhere, can't remember where... I believe it has a /reverse or /invert option, not at my computer right now.

Secondly, you should bsort columns in increasing order of importance, with the most important sort last.

I have a dumb for-loop procedure that does that. This requires multiple searches through the array, which might not be optimal, but once you write it, you'll never use sort instead of bsort again :-)

G
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How 2 show animations.
Next Topic: Re: Read Andor CCD camera .sif file format in IDL?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 13:16:00 PST 2025

Total time taken to generate the page: 0.00262 seconds