mglib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

indices/

mg_setintersection.pro


Routines

top 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 -1L indicates an empty set of indices

ind2 in required type=lonarr or -1L

array of indices where -1L indicates 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: Wed May 14 15:07:14 2014
Lines: 12
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.