[−][src]Function arrayfire::sort_by_key
pub fn sort_by_key<K, V>(
keys: &Array<K>,
vals: &Array<V>,
dim: u32,
ascending: bool
) -> (Array<K>, Array<V>) where
K: HasAfEnum + RealNumber,
V: HasAfEnum,
Sort the values in input Arrays
Sort an multidimensional Array based on keys
Parameters
keys
- Array with key valuesvals
- Array with input valuesdim
- Dimension along which to sortascending
- Sorted output will have ascending values ifTrue
and descending order otherwise.
Return Values
A tuple of Arrays.
The first Array contains the keys based on sorted values.
The second Array contains the sorted values.