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 #83311 is a reply to message #83310] Sat, 23 February 2013 13:15 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 2/23/13 2:46 PM, Paulo Penteado wrote:
>
> 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.
>

By definition, a set only has one copy of each element, so I wouldn't be
surprised if things fail if it's not a true set.

-Jeremy.
[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: Sat Oct 11 14:58:43 PDT 2025

Total time taken to generate the page: 0.16244 seconds