|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home MathPack OpenArrays Procedures and Functions MinMaxArray|
|See also: MinMax (Matrix), MinMax (Vector), MaxArray, MinArray|
The function MinMaxArray returns the minimum and the maximum value of the array Src in the variable parameters MinVal and MaxVal.
Please note that versions  and , and  and  are actually equivalent. Versions  and  have been declared for syntactical reasons only: they can be called using an explicit list of values, something like
MinMaxArray ([v1,v2,v3,v4], MinVal, MaxVal);while versions  and  cannot be called this way (the compiler does not resolve the TDoubleArray declaration).
Versions , ,  and  provide additional information and can be restricted to a particular range of array elements. The parameters FirstIx and LastIx define the search range for versions  and , the parameters LowCol, LowRow, HighCol and HighRow specify the search range of versions  and . The variable parameters MinIx and MaxIx (versions  and ) and MinCol, MinRow, MaxCol, MaxRow (versions  and ) return the indices of the found minimum and maximum.
The function returns a zero value if everything is OK and the MinVal and MaxVal parameters contain the minimum and maximum.
The function returns the following error codes:
0 ... everything is OK, the returned value is valid