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

Home » Public Forums » archive » Would you consider this a bug?
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: Would you consider this a bug? [message #13065 is a reply to message #12982] Thu, 01 October 1998 00:00 Go to previous messageGo to previous message
Kevin Ivory is currently offline  Kevin Ivory
Messages: 71
Registered: January 1997
Member
Leaving the bug topic - switching to algorithms

David Kastrup wrote:
> Unfortunately, translating something like
>
> a[[5,2,3,0,4,1]] = a
> into the equivalent
> a = a[[3,5,1,2,4,0]]
> is not easy to do in the general case.

Actually it is: you need a second call to sort. See example below.

> some data that needed to be processed in sorted order, the results
> needed to be rearranged in original order.
>
> Something like
> s = sort(a)
> a = a[s]
> process(a)
; a[s] = a ; I still think this a dangerous thing to do.
r = sort(s)
a = a[r]

Best regards
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Max-Planck-Str. 2 mailto:Kevin.Ivory@linmpi.mpg.de
D-37191 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: CENTERING TEXT
Next Topic: what am I doing wrong?

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

Current Time: Sun Oct 12 03:53:33 PDT 2025

Total time taken to generate the page: 1.20081 seconds