Evaluate the intersection of two arrays. More...
Functions | |
AFAPI array | setIntersect (const array &first, const array &second, const bool is_unique=false) |
C++ Interface to evaluate the intersection of two arrays. More... | |
AFAPI af_err | af_set_intersect (af_array *out, const af_array first, const af_array second, const bool is_unique) |
C Interface to evaluate the intersection of two arrays. More... | |
AFAPI array | setintersect (const array &first, const array &second, const bool is_unique=false) |
Evaluate the intersection of two arrays.
The inputs must be one-dimensional arrays. Batching is not currently supported.
An example:
The function can be sped up if the input is sorted in increasing order and its values are unique.
AFAPI af_err af_set_intersect | ( | af_array * | out, |
const af_array | first, | ||
const af_array | second, | ||
const bool | is_unique | ||
) |
C Interface to evaluate the intersection of two arrays.
[out] | out | intersection, values in increasing order |
[in] | first | input array |
[in] | second | input array |
[in] | is_unique | if true, skip calling unique internally |
AFAPI array setIntersect | ( | const array & | first, |
const array & | second, | ||
const bool | is_unique = false |
||
) |
C++ Interface to evaluate the intersection of two arrays.
[in] | first | input array |
[in] | second | input array |
[in] | is_unique | if true, skip calling setUnique internally |
AFAPI array setintersect | ( | const array & | first, |
const array & | second, | ||
const bool | is_unique = false |
||
) |
C++ Interface to evaluate the intersection of two arrays.
[in] | first | input array |
[in] | second | input array |
[in] | is_unique | if true, skip calling setUnique internally |