MatrixInt.Min Method

Overload List

#SignatureDescription
1function Min: Integer;Minimum value.
└ indexed: function Min(const Index: Integer; const Len: Integer): Integer;
2function Min(out aIndex: Integer): Integer;Calculate the minimum value of all calling object elements.
└ indexed: function Min(out aIndex: Integer; const Index: Integer; const Len: Integer): Integer;

Overload 1: function Min: Integer;

Minimum value.

Returns: Int32 - The minimum value of all calling object elements. The result is an integer value.

Examples
var
    a: TMtxInt;
begin
MtxVecInt.CreateIt(out a);
try
a.SetIt(False, [1,2,3,4]);
int b = a.Min;  // 1
finally
MtxVecInt.FreeIt(ref a);
end;
end;
See Also: MatrixInt.Max

Indexed: function Min(const Index: Integer; const Len: Integer): Integer;

Calculate the minimum value from calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1IndexIntegerstart index
2LenIntegerelement count

Returns: Int32

Remarks:

The result is an integer value. An exception is raised if array borders are overrun.

Overload 2: function Min(out aIndex: Integer): Integer;

Calculate the minimum value of all calling object elements.

#NameDescription
1aIndexStores minimum value index.

Returns: Int32 - the minimum of all calling vector integer elements in-place.

Examples
var
    a: TMtxInt;
    ind: Integer;
begin
MtxVecInt.CreateIt(out a);
try
a.SetIt(new int[] {1,2,3,4});
int min = a.Min(out ind); //min=1, ind = 0
finally
MtxVecInt.FreeIt(ref a);
end;
end;
See Also: MatrixInt.Max

Indexed: function Min(out aIndex: Integer; const Index: Integer; const Len: Integer): Integer;

Calculate the maximum value of calling object elements [Index..Index+Len-1].

#NameDescription
1aIndexReturns minimum value index.
2IndexThe starting index at which to start the search.
3LenThe number of elements to search starting from Index.

Returns: Int32 - the minimum of calling vector integer elements [Index..Index+Len-1].

Remarks:

An exception is raised if array borders are overrun/underrun.