indices/
mg_setintersection.pro
top source mg_setintersection
result = mg_setintersection(ind1, ind2 [, count=long])
Find the intersection of two sets of indices. A set of indices is
represented by an array of non-negative integers where a scalar -1L
indicates the empty set.
Return value
lonarr or -1L
Parameters
- ind1 in required type=lonarr or -1L
array of indices where
-1Lindicates an empty set of indices- ind2 in required type=lonarr or -1L
array of indices where
-1Lindicates an empty set of indices
Keywords
- count out optional type=long
set to a named variable to return the number of elements in the intersection
Examples
For example, try:
IDL> print, mg_setintersection([0, 3, 5, 6, 9], [3, 5, 7])
3 5
File attributes
| Modification date: | Fri Oct 28 14:21:02 2011 |
| Lines: | 45 |
| Docformat: | rst rst |
Contact me if you have enhancement requests or bug fixes.
![[attach.png]](../idldoc-resources/attach.png)