Functions | |
| array | sort (const array &in, int dim=-1, bool isdescending=false) |
| Sort array along dimension. | |
| void | sort (array &values, array &indices, const array &in, int dim=-1, bool isdescending=false) |
| Sort array along dimension and return original indices of sorted values. | |
| void | sort (array &outkeys, array &outvalues, const array &keys, const array &values, bool isdescending=false) |
Sort array values based on keys along dimension. | |
| array | sortdim (const array &in, int dim) |
| sort treating one dimension as keys. | |
| array | sortdim (const array &in, int dim, unsigned norder, const int *h_order) |
| sort treating one dimension as keys in specific order. | |
| array af::sort | ( | const array & | in, |
| int | dim = -1, |
||
| bool | isdescending = false |
||
| ) |
Sort array along dimension.
| [in] | in | |
| [in] | dim | dimension along which to operate (-1 indicates first nonsingleton dimension) |
| [in] | isdescending | true if descending order, false (default) in ascending order |
| void af::sort | ( | array & | values, |
| array & | indices, | ||
| const array & | in, | ||
| int | dim = -1, |
||
| bool | isdescending = false |
||
| ) |
Sort array along dimension and return original indices of sorted values.
| [out] | values | |
| [out] | indices | |
| [in] | in | |
| [in] | dim | dimension along which to operate (-1 indicates first nonsingleton dimension) |
| [in] | isdescending | true if descending order, false (default) in ascending order |
| void af::sort | ( | array & | outkeys, |
| array & | outvalues, | ||
| const array & | keys, | ||
| const array & | values, | ||
| bool | isdescending = false |
||
| ) |
Sort array values based on keys along dimension.
| [out] | outkeys | |
| [out] | outvalues | |
| [in] | keys | |
| [in] | values | |
| [in] | isdescending | true if descending order, false (default) in ascending order |
| array af::sortdim | ( | const array & | in, |
| int | dim | ||
| ) |
sort treating one dimension as keys.
| [in] | in | |
| [in] | dim | dimension along which to sort |
| array af::sortdim | ( | const array & | in, |
| int | dim, | ||
| unsigned | norder, | ||
| const int * | h_order | ||
| ) |
sort treating one dimension as keys in specific order.
| [in] | in | |
| [in] | dim | dimension along which to sort |
| [in] | h_order | Host array specifying key order and directions of sort |
| [in] | norder | Number of elements in h_order |