Finds unique values from an input set. More...
Functions | |
AFAPI array | setUnique (const array &in, const bool is_sorted=false) |
C++ Interface for getting unique values. | |
AFAPI af_err | af_set_unique (af_array *out, const af_array in, const bool is_sorted) |
C Interface for getting unique values. | |
AFAPI array | setunique (const array &in, const bool is_sorted=false) |
Finds unique values from an input set.
The input must be a one-dimensional array. Batching is not currently supported.
A simple example of finding the unique values of a set using setUnique() can be seen below:
The function can be sped up if it is known that the inputs are sorted.
The inputs can be sorted in ascending or descending order.
C Interface for getting unique values.
[out] | out | will contain the unique values from in |
[in] | in | is the input array |
[in] | is_sorted | if true, skips the sorting steps internally |
C++ Interface for getting unique values.
[in] | in | is the input array |
[in] | is_sorted | if true, skips the sorting steps internally |
in
C++ Interface for getting unique values.
[in] | in | is the input array |
[in] | is_sorted | if true, skips the sorting steps internally |
in