Back to FabImage Studio website
You are here: Start » Filter Reference » Array » Array Transforms » SortArray
Module: | FoundationLite |
---|
Changes the order of the input array elements according to an ascending/descending sequence of the value array.
Name | Type | Description | |
---|---|---|---|
inArray | <T>Array | Elements to be sorted | |
inValues | RealArray | Values defining the order | |
inSortingOrder | SortingOrder | Sorting order | |
outSortedArray | <T>Array | Sorted elements | |
outSortedValues | RealArray | Sorted values |
The type of this filter is defined using the type variable T which represents any valid type. Read more.
Examples
Description of usage of this filter can be found in examples and tutorial: Pins.
inArray = {"John","Alice","Bob","Karen"} inValues = {0.0,10.0,4.0,3.0} |
outSortedArray = {"John","Karen","Bob","Alice"} outSortedValues = {0.0,3.0,4.0,10.0} |
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Inconsistent array sizes in SortArray. |
Complexity Level
This filter is available on Advanced Complexity Level.
See Also
- GetSortedElements – Returns elements corresponding to 8 smallest/biggest values from the array of values.