Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Min(): integer; overload; | Minimum value. |
| └ indexed: function Min(Index, Len: integer): integer; overload; | ||
| 2 | function Min(out aIndex: integer): integer; overload; | Calculate the minimum value of all calling object elements. |
| └ indexed: function Min(out aIndex: integer; Index, Len: integer): integer; overload; |
Overload 1: function Min(): integer; overload;
Minimum value.
Returns: integer - The minimum value of all calling object elements. The result is an integer value.
var a: VectorInt;
b: integer;
begin
a := [1,2,3,4];
b := a.Min; // 1
end;
Indexed: function Min(Index, Len: integer): integer; overload;
Calculate the minimum value from calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | integer | start index |
| 2 | Len | integer | element count |
Returns: integer
The result is an integer value. An exception is raised if array borders are overrun.
Overload 2: function Min(out aIndex: integer): integer; overload;
Calculate the minimum value of all calling object elements.
| # | Name | Description |
|---|---|---|
| 1 | aIndex | Stores minimum value index. |
Returns: integer - the minimum of all calling vector integer elements in-place.
Uses MtxExprInt;
procedure Example;
var a: VectorInt;
min, ind: integer;
begin
a := [1,2,3,4];
min := a.Min(ind); //min=1, ind = 0
end;
Indexed: function Min(out aIndex: integer; Index, Len: integer): integer; overload;
Calculate the maximum value of calling object elements [Index..Index+Len-1].
| # | Name | Description |
|---|---|---|
| 1 | aIndex | Returns minimum value index. |
| 2 | Index | The starting index at which to start the search. |
| 3 | Len | The number of elements to search starting from Index. |
Returns: integer - the minimum of calling vector integer elements [Index..Index+Len-1].
An exception is raised if array borders are overrun/underrun.