A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arrayfire.org/docs/group__set__func__unique.htm below:

ArrayFire: setunique

Return the unique values in an array. More...

Return the unique values in an array.

The input must be a one-dimensional array. Batching is not currently supported.

An example, unsorted:

int h_set[6] = {3, 2, 3, 3, 2, 1};

A multi dimensional data container.

The function can be sped up if it is known that the inputs are sorted.

An example, sorted (ascending):

int h_set[6] = {1, 2, 2, 3, 3, 3};

const bool is_sorted = true;

af::array

unique = setUnique(set, is_sorted);

The inputs can be sorted in ascending or descending order.

An example, sorted (descending):

int h_set[6] = {3, 3, 3, 2, 2, 1};

const bool is_sorted = true;

af::array

unique = setUnique(set, is_sorted);

◆ af_set_unique()

C Interface to return the unique values in an array.

Parameters
[out] out unique values [in] in input array [in] is_sorted if true, skip the sorting steps internally
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given
◆ setUnique()

C++ Interface to return the unique values in an array.

Parameters
[in] in input array [in] is_sorted if true, skip the sorting steps internally
Returns
unique values
◆ setunique()

C++ Interface to return the unique values in an array.

Parameters
[in] in input array [in] is_sorted if true, skip the sorting steps internally
Returns
unique values
Deprecated:
Use setUnique instead

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4