Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function SortAscend: TVecInt; | Sort all calling vector elements in ascending order in-place. |
| └ indexed: function SortAscend(Index: Integer; Len: Integer): TMtxVecInt; | ||
| 2 | function SortAscend(DstSortIdx: TVecInt): TVecInt; | Sort all calling vector elements in ascending order in-place. |
| 3 | function SortAscend(DstSortIdx: TMtxVecInt; SortIdxIndex: Integer; Index: Integer; Len: Integer): TMtxVecInt; | Sort all calling vector elements in ascending order in-place. |
Overload 1: function SortAscend: TVecInt;
Sort all calling vector elements in ascending order in-place.
Result: stored in self (calling object), returns self for chaining
Examples
var A: TMtx;
begin
CreateIt(A);
try
A.SetIt(2,2,False,[1,2,
4,2]);
A.SortAscend;
// A becomes:
// [1,2]
// [2,4]
finally
FreeIt(A);
end;
end;
Indexed: function SortAscend(Index: Integer; Len: Integer): TMtxVecInt;
Sort calling vector elements [Index..Index+Len-1] in ascending order in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Integer | start index |
| 2 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Overload 2: function SortAscend(DstSortIdx: TVecInt): TVecInt;
Sort all calling vector elements in ascending order in-place.
| # | Name | Description |
|---|---|---|
| 1 | DstSortIdx | After execution stores sorted values indices. |
Result: stored in self (calling object), returns self for chaining
Returns: calling vector, storing sorted values.
Remarks:
Size of DstSortIdx and calling vector are adjusted automatically.
Overload 3: function SortAscend(DstSortIdx: TMtxVecInt; SortIdxIndex: Integer; Index: Integer; Len: Integer): TMtxVecInt;
Sort all calling vector elements in ascending 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.
Remarks:
Size of DstSortIdx and calling vector are adjusted automatically.