clVector.MaxMin Method

Overload List

#SignatureDescription
1procedure MaxMin(out AMax: Double; out AMin: Double);Maximum and minimum value in a single pass.
└ indexed: procedure MaxMin(out AMax: Double; out AMin: Double; Index: Integer; Len: Integer);
2procedure MaxMin(out AMax: Double; out MaxIdx: Integer; out AMin: Double; out MinIdx: Integer);Calculates the maximum and minimum value of all calling object elements.
└ indexed: procedure MaxMin(out AMax: Double; out MaxIdx: Integer; out AMin: Double; out MinIdx: Integer; Index: Integer; Len: Integer);

Overload 1: procedure MaxMin(out AMax: Double; out AMin: Double);

Maximum and minimum value in a single pass.

#NameTypeDescription
1AMaxDouble
2AMinDouble

Result: stored in self (calling object)

Remarks:

Calculates the maximum and minimum value of all calling object elements in a single pass. Maximum value is stored in AMax parameter, minimum value is stored in AMin parameter. Use this method if you require minimum AND maximum value.

See Also: clVector.Min, clVector.Max

Indexed: procedure MaxMin(out AMax: Double; out AMin: Double; Index: Integer; Len: Integer);

Calculates the maximum and minimum value of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMaxDouble
2AMinDouble
3IndexIntegerstart index
4LenIntegerelement count

Result: stored in self (calling object)

Remarks:

Maximum value is stored in AMax parameter, minimum value is stored in AMin parameter. An exception is raised if calling object clVector.Complex property is true or array borders are overrud/underrun.

Overload 2: procedure MaxMin(out AMax: Double; out MaxIdx: Integer; out AMin: Double; out MinIdx: Integer);

Calculates the maximum and minimum value of all calling object elements.

#NameTypeDescription
1AMaxDouble
2MaxIdxInteger
3AMinDouble
4MinIdxInteger

Result: stored in self (calling object)

Remarks:

Maximum value is returned in AMax parameter, minimum value in AMin parameter. The MaxIdx parameter returns the index of maximum value. The MinIdx parameter returns the index of minimum value. An exception is raised if calling object clVector.Complex property is true.

Indexed: procedure MaxMin(out AMax: Double; out MaxIdx: Integer; out AMin: Double; out MinIdx: Integer; Index: Integer; Len: Integer);

Calculates the maximum and minimum value of calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1AMaxDouble
2MaxIdxInteger
3AMinDouble
4MinIdxInteger
5IndexIntegerstart index
6LenIntegerelement count

Result: stored in self (calling object)

Remarks:

Maximum value is returned in AMax parameter, minimum value in AMin parameter. The MaxIdx parameter returns the index of maximum value. The MinIdx parameter returns the index of minimum value. An exception is raised if calling object clVector.Complex property is true or if array borders are overrun/underrun.