[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Top 10 IDL Requests




Alex Schuster <alex@pet.mpin-koeln.mpg.de> writes:
> 5) The complement to WHERE() is great. Now I would like routines which
> give me the intersection of two arrays, the union, and the difference.
> These already exist (setintersection.pro etc.), but they were written by
> somebody and are not part of the standard distribution. 
> I'd also like something like an IN operator: a IN b gives 1, if the
> scalar a is in the array b.

I agree this would be nice notation.  I have a function CMSET_OP on my
web page which is more full-featured and robust than the RSI set
functions: it has "union," "intersect," and "exclusive or," plus it
works on string and float values.  There was a big discussion a few
months ago about these techniques, with JD Smith being a big
contributor.

In my own personal version of CMSET_OP I have the capability to
extract array indices rather than array values, which was a requested
feature in the discussion.  When the current crush of urgent work
subsides, I will post that updated version (a few days).

Craig

-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------