|
sort
|
The sort function returns a sorted copy of the specified
Structure, Dictionary, Directory, Vector, Matrix, Pair or List argument
{target} in the order specified by the argument predicate {predicate}.
If the optional Boolean argument {true} is present, the sort function does not
sort the specified target; but instead, returns a sorted integer vector of indices
into the specified target.
When to use The sort function sorts all the elements in a Matrix and returns the sorted
version of the Matrix . The sort function is destructive except for the option
containing the keyword {true}, which returns a new sorted integer Matrix .
(sort matrix predicate ) (sort matrix predicate true)) The sorted Matrix is returned.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types matrix The Matrix to be sorted Matrix predicate predicate > means sort in descending order, predicate < means sort in
ascending order true Optional keyword, if present, an integer Vector containing stored indices to the
Matrix to be sorted. Boolean
Returns:
Examples
Argument Types
Structure
Dictionary
Directory
List
NumMatrix
ShortVector
Matrix
Vector
String
Text
Integer
Boolean
How do I contact the AIS team?