Return the unique values in an array. More...
Functions | |
AFAPI array | setUnique (const array &in, const bool is_sorted=false) |
C++ Interface to return the unique values in an array. More... | |
AFAPI af_err | af_set_unique (af_array *out, const af_array in, const bool is_sorted) |
C Interface to return the unique values in an array. More... | |
AFAPI array | setunique (const array &in, const bool is_sorted=false) |
Return the unique values in an array.
The input must be a one-dimensional array. Batching is not currently supported.
An example, unsorted:
The function can be sped up if it is known that the inputs are sorted.
An example, sorted (ascending):
The inputs can be sorted in ascending or descending order.
An example, sorted (descending):
C Interface to return the unique values in an array.
[out] | out | unique values |
[in] | in | input array |
[in] | is_sorted | if true, skip the sorting steps internally |
C++ Interface to return the unique values in an array.
[in] | in | input array |
[in] | is_sorted | if true, skip the sorting steps internally |
C++ Interface to return the unique values in an array.
[in] | in | input array |
[in] | is_sorted | if true, skip the sorting steps internally |