Find the union of two sets. More...
Functions | |
AFAPI array | setUnion (const array &first, const array &second, const bool is_unique=false) |
C++ Interface for finding the union of two arrays. | |
AFAPI af_err | af_set_union (af_array *out, const af_array first, const af_array second, const bool is_unique) |
C Interface for finding the union of two arrays. | |
AFAPI array | setunion (const array &first, const array &second, const bool is_unique=false) |
Find the union of two sets.
The inputs must be one-dimensional arrays. Batching is not currently supported.
A simple example of finding the union of two sets using setUnion() can be seen below:
The function can be sped up if it is known that each input is sorted in increasing order and its values are unique.
AFAPI af_err af_set_union | ( | af_array * | out, |
const af_array | first, | ||
const af_array | second, | ||
const bool | is_unique | ||
) |
C Interface for finding the union of two arrays.
[out] | out | will contain the union of first and second |
[in] | first | is the first input array |
[in] | second | is the second input array |
[in] | is_unique | if true, skips calling unique internally |
C++ Interface for finding the union of two arrays.
[in] | first | is the first input array |
[in] | second | is the second input array |
[in] | is_unique | if true, skips calling unique internally |
first
and second
(union) in increasing order C++ Interface for finding the union of two arrays.
[in] | first | is the first input array |
[in] | second | is the second input array |
[in] | is_unique | if true, skips calling unique internally |
first
and second
(union) in increasing order