Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx SortDescend | Sorts the elements in a matrix row(s) in descending order. |
| 2 | TMtx SortDescend(Int32 Col) | Performs row based sort in descending order. The Col parameter defines the column based on which the rows are compared with each other. |
Overload 1: TMtx SortDescend
Sorts the elements in a matrix row(s) in descending order.
Result: stored in self (calling object), returns self for chaining
Remarks:
Sorts the elements in calling matrix row(s) in descending 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.SortDescend;
// A becomes:
// [2,1]
// [4,2]
}
finally
{
MtxVec.FreeIt(ref A);
}
See Also: TMtx.SortAscend
Overload 2: TMtx SortDescend(Int32 Col)
Performs row based sort in descending 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