TVecByte.MaxMinIdx Method

procedure MaxMinIdx(out aMax: Integer; out aMaxIdx: Integer; out aMin: Integer; out aMinIdx: Integer);

Calculate minimum, maximum and their indices in one procedure call.

#NameDescription
1aMaxReturns calling vector maximum value.
2aMaxIdxReturns calling vector maximum value index.
3aMinReturns calling vector monimum value.
4aMinIdxReturns calling vector minimum value index.

Result: stored in self (calling object)

Indexed: procedure MaxMinIdx(out aMax: Integer; out aMaxIdx: Integer; out aMin: Integer; out aMinIdx: Integer; Index: Integer; Len: Integer);

Calculate minimum, maximum and their indices in one procedure call.

#NameDescription
1aMaxReturns calling vector elements [Index..Index+Len-1] maximum value.
2aMaxIdxReturns calling vector maximum value index.
3aMinReturns calling vector elements [Index..Index+Len-1] minimum value.
4aMinIdxReturns calling vector minimum value index.
5IndexThe starting index at which to start the search.
6LenThe number of elements to search starting from Index.

Result: stored in self (calling object)

Remarks:

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