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

Home » Public Forums » archive » Re: Interesting property of 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
Re: Interesting property of sort [message #54089 is a reply to message #53990] Wed, 16 May 2007 06:44 Go to previous message
cmancone is currently offline  cmancone
Messages: 30
Registered: May 2007
Member
excellent point, thanks for the tip. Out of curiosity, does bsort add
a lot of overhead compared to a regular sort?

On May 16, 9:40 am, David Fanning <n...@dfanning.com> wrote:
> hradilv writes:
>> To add the obvious(?) - be careful if you try this with repeated
>> values.
>
>> test = [5,4,4,1,3,2]
>> sortindex = sort(test)
>> lookup = sort(sortindex)
>> print, lookup[4]
>> ; prints "2" [hey what about "1"]...
>
> Yeah, better use BSORT for this. :-)
>
> http://www.dfanning.com/tips/sort.html
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Thicker points
Next Topic: Re: how to write a K with a hat symbol above

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

Current Time: Sat Oct 11 20:54:39 PDT 2025

Total time taken to generate the page: 1.99890 seconds