Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtxInt SortDescend | Sorts the elements in a matrix row(s) in descending order. |
| └ indexed: TMtxVecInt SortDescend(Int32 Index, Int32 Len) | ||
| 2 | TMtxInt 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. |
| 3 | TMtxVecInt SortDescend(TMtxVecInt DstSortIdx, Int32 SortIdxIndex, Int32 Index, Int32 Len) | Sort all calling vector elements in descending order in-place. |
Overload 1: TMtxInt SortDescend
Sorts the elements in a matrix row(s) in descending order.
Result: stored in self (calling object), returns self for chaining
Sorts the elements in calling matrix row(s) in descending order in-place.
Note
Each row is sorted independently from the other.
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);
}
Indexed: TMtxVecInt SortDescend(Int32 Index, Int32 Len)
Sort calling vector elements [Index..Index+Len-1] in descending order in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Int32 | start index |
| 2 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Overload 2: TMtxInt 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
Overload 3: TMtxVecInt SortDescend(TMtxVecInt DstSortIdx, Int32 SortIdxIndex, Int32 Index, Int32 Len)
Sort all calling vector elements in descending order in-place.
| # | Name | Description |
|---|---|---|
| 1 | DstSortIdx | After execution stores sorted values indices. |
| 2 | SortIdxIndex | The starting index at which to store sorted values indices in DstSortIdx. |
| 3 | Index | The starting index at which to start the sort. |
| 4 | Len | The number of elements to sort starting from including zero-based Index. |
Result: stored in self (calling object), returns self for chaining
Returns: calling vector, storing sorted values.
Size of DstSortIdx and calling vector are adjusted automatically.