<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Matrix/

union.pro

calculate tne union between 2 matrixes of whole numbers

topunion calculation of matrixes

result = union(a, b)

Return value

tableau

Parameters

a        in required

arrays of positive integers, which need not be sorted. Duplicate elements are ignored, as they have no effect on the result

b        in required

see a

Examples

a = [2,4,6,8] b = [6,1,3,2] union(a,b) = [ 1, 2, 3, 4, 6, 8] ; Elements in either set

Version history

Version

$Id: union.pro 134 2006-07-07 10:19:08Z navarro $

History

http://www.dfanning.com/tips/set_operations.html

Known issues

Restrictions

The empty set is denoted by an array with the first element equal to -1. These functions will not be efficient on sparse sets with wide ranges, as they trade memory for efficiency. The HISTOGRAM function is used, which creates arrays of size equal to the range of the resulting set.
Produced by IDLdoc 2.0.