Changeset 230 for trunk/SRC/Matrix/different.pro
- Timestamp:
- 03/19/07 11:17:59 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Matrix/different.pro
r163 r230 4 4 ;+ 5 5 ; 6 ; @file_comments 6 ; @file_comments 7 7 ; calculate the different elements of 2 matrix of positive whole numbers. 8 8 ; … … 10 10 ; Calculation 11 11 ; 12 ; @param a {in}{required} arrays of positive integers, which need 12 ; @param a {in}{required} 13 ; arrays of positive integers, which need 13 14 ; not be sorted. Duplicate elements are ignored, as they have no 14 15 ; effect on the result 15 16 ; 16 ; @param b {in}{required} see a 17 ; @param b {in}{required} 18 ; see a 17 19 ; 18 ; @returns tableau 20 ; @returns 21 ; tableau 19 22 ; 20 ; @restrictions The empty set is denoted by an array with the first element equal to 23 ; @restrictions 24 ; The empty set is denoted by an array with the first element equal to 21 25 ; -1. 22 26 ; 23 ; @restrictions These functions will not be efficient on sparse sets with wide 27 ; @restrictions 28 ; These functions will not be efficient on sparse sets with wide 24 29 ; ranges, as they trade memory for efficiency. The HISTOGRAM function 25 30 ; is used, which creates arrays of size equal to the range of the … … 28 33 ; @examples 29 34 ; 30 ; a = [2,4,6,8]31 ; b = [6,1,3,2]32 ; different(a,b) = [ 4, 8] ; Elements in A but not in B35 ; IDL> a = [2,4,6,8] 36 ; IDL> b = [6,1,3,2] 37 ; IDL> different(a,b) = [ 4, 8] ; Elements in A but not in B 33 38 ; 34 ; @history http://www.dfanning.com/tips/set_operations.html 39 ; @history 40 ; http://www.dfanning.com/tips/set_operations.html 35 41 ; 36 ; @version $Id$ 42 ; @version 43 ; $Id$ 37 44 ; 38 45 ;- … … 40 47 ;------------------------------------------------------------ 41 48 ;------------------------------------------------------------ 42 FUNCTION different, a, b 49 FUNCTION different, a, b 43 50 ; 44 51 compile_opt idl2, strictarrsubs
Note: See TracChangeset
for help on using the changeset viewer.