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

Home » Public Forums » archive » Re: IDL sorting
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL sorting [message #56344 is a reply to message #56343] Thu, 18 October 2007 13:43 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Oct 18, 2:30 pm, Karl Schultz <k...@io.frii.com> wrote:
> Because it is not a *stable* sort. Stable sorting algorithms preserve
> the order of equal keys.
>
>> IDL just uses the sort algorithm of the underlying OS. As far as I
>> am aware, the SORT function on Linux boxes *does* preserve the order
>> of equal values, but that on Mac and Windows machines does not. I
>> would be interested to hear if anyone finds any exceptions to this
>> rule.
>
> Are you using this SORT function from the command line? If so, you
> are using a shell function or a sort program in your PATH. Someone
> probably decided that a stable sort made more sense for people sorting
> things from the command line or from shell scripts. Reasonable.
>

I don't understand this paragraph. I am just using the IDL intrinisc
SORT command. On every Linux box I have ever been on, it appears
that the C lib sort algorithm used by IDL SORT() *is* stable, whereas
it is *not* stable on Windows or MacOS.

But I like the idea of adding a /STABLE keyword to SORT. Thanks, --
Wayne
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: read_tiff only looks in current working directory?
Next Topic: ADF format in IDL

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

Current Time: Sat Oct 11 08:58:24 PDT 2025

Total time taken to generate the page: 0.24140 seconds