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 #56359 is a reply to message #56353] Thu, 18 October 2007 05:20 Go to previous messageGo to previous message
Wox is currently offline  Wox
Messages: 184
Registered: August 2006
Senior Member
On Wed, 17 Oct 2007 09:38:12 -0600, David Fanning <news@dfanning.com>
wrote:

> I'm not sure it's more elegant, but the NASA BSORT
> routine certainly takes a lot of the work out of it. :-)

It does the same I suscribed: resorting each subarray of equal values
by its original subscript. I was hoping that there would be a better
solution.

If I had to sort 32-bit longs, I could e.g. make 64-bit longs with HO
DWORD equal to the value and the LO DWORD equal to the subscript.
Sorting the resulting 64-bit longs would do the trick, wouldn't it?

function sort,array
array64=ishft(long64(array),32)+lindgen(n_elements(array))
return,sort(array64)
end

However, I want to sort 64-bit values. Maybe there is another way, so
that sort will do the right thing. Btw, I didn't want to ask this, but
why is IDL's sort doing this? Is there any situation where mixing up
the order of equal values has a benefit?
[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: Wed Oct 08 19:25:14 PDT 2025

Total time taken to generate the page: 0.00436 seconds