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

Home » Public Forums » archive » Re: setintersection assumes sets have no repetitions?
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: setintersection assumes sets have no repetitions? [message #83310] Sat, 23 February 2013 22:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paulo Penteado writes:

> I am using Coyote's set functions, and I noticed that when I use some
> (not any) sets with repetitions as input, it crashes:
>
> IDL>
> a=[1,2,3,4,5]
> IDL>
> b=[1,2,2,2]
> IDL>
> print,setintersection(a,b,indices_a=ia,indices_b=ib,position s=pos)
> % Compiled module: SETINTERSECTION.
> % Compiled module: REVERSEINDICES.
> % Compiled module: ERROR_MESSAGE.
>
> Traceback Report from SETINTERSECTION:
>
> % Out of range subscript encountered: BINDICES.
> % Execution halted at: SETINTERSECTION 192 /software/idl/
> others/idl-coyote-read-only/coyote/setintersection.pro
> % $MAIN$
> -1
>
> Is this the expected behavior? Are the input sets supposed not to have
> repetitions? The documentation suggests they may have repeated
> elements, thus making the positions array different from indices_a.

Well, I don't know. That code was added at the request of Mr. Stockwell.
Let's see if he has any ideas about this. :-)

For the moment, I would consider commenting that section of the code
out.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: question on READ_CSV
Next Topic: IDL programmer wanted

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

Current Time: Wed Oct 08 20:09:34 PDT 2025

Total time taken to generate the page: 0.74566 seconds