This function is used to find the difference between two sets of integers. In other words, the function will find the values that are in Set A but are missing in Set B.
Utilities
A vector of values that are found in set_a but are missing in set_b.
set_a: in, required, type=integer A vector of integers. set_b: in, required, type=integer A vector of integers.
count: out, optional, type=integer This keyword contains the number of elements in the difference vector. noresult: in, optional Set this keyword to a value that will be returned from the function if no difference between the two sets of numbers is found. By default, set_a. positions: out, optional, type=integer An output keyword that will return the positions or locations in A of the values not found in B. success: out, optional, type=boolean This keyword is set to 1 if an difference was found, and to 0 otherwise.
Here is how to use this program:: IDL> set_a = [1,2,3,4,5] IDL> set_b = [4,5,6,7,8,9,10,11] IDL> Print, cgSetDifference(set_a, set_b) 1 2 3
FANNING SOFTWARE CONSULTING:: David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
Change History:: Written by: David W. Fanning, November 25, 2009, from code originally supplied to the IDL newsgroup by Research Systems software engineers. Added COUNT and POSITIONS keywords. Liam Steele, 13 Dec 2012. Defined values for COUNT and POSITIONS when there is no overlap in the vectors. 14 Dec 2012. LS.
Copyright (c) 2009-2013, Fanning Software Consulting, Inc.