Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx SortAscend | Sorts the elements in a matrix row(s) in ascending order. |
| 2 | TMtx SortAscend(Int32 Col) | Performs row based sort in ascending order. The Col parameter defines the column based on which the rows are compared with each other. |
Overload 1: TMtx SortAscend
Sorts the elements in a matrix row(s) in ascending order.
Result: stored in self (calling object), returns self for chaining
Remarks:
Sorts the elements in calling matrix row(s) in ascending order in-place. If the calling matrix is complex, then complex values are first compared by the absolute value and then by the argument.
Note
Each row is sorted independently from the other.
Examples
TMtx A;
MtxVec.CreateIt(out A);
try
{
A.SetIt(2,2,false,[1,2,
4,2]);
A.SortAscend;
// A becomes:
// [1,2]
// [2,4]
}
finally
{
MtxVec.FreeIt(ref A);
}
See Also: TMtx.SortDescend
Overload 2: TMtx SortAscend(Int32 Col)
Performs row based sort in ascending order. The Col parameter defines the column based on which the rows are compared with each other.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Col | Int32 |
Result: stored in self (calling object), returns self for chaining