[ILNumerics Core Module]
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 184.108.40.206 (5.3.7131.2749)
public static bool GetLimits( this BaseArray<double> A, out double min, out double max, bool ignoreInfinity = false )
<ExtensionAttribute> Public Shared Function GetLimits ( A As BaseArray(Of Double), <OutAttribute> ByRef min As Double, <OutAttribute> ByRef max As Double, Optional ignoreInfinity As Boolean = false ) As Boolean Dim A As BaseArray(Of Double) Dim min As Double Dim max As Double Dim ignoreInfinity As Boolean Dim returnValue As Boolean returnValue = A.GetLimits(min, max, ignoreInfinity)
- Type: ILNumericsBaseArray
[Output] The minimum value in A.
[Output] The maximum value in A.
- ignoreInfinity (Optional)
[Optional] When true only non-infinity and non-NaN values will be considered as regular values. Default: false.
True, if the minimum and maximum values could be computed. False otherwise.
Usage NoteIn Visual Basic and C#, you can call this method as an instance method on any object of type BaseArray. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
|If A is empty.|
For complex values the real and imaginary parts of all elements are considered independently and the limits are returned separated in the real and imaginary parts of min and max.
The operation is efficiently performed on all elements of the input A in a single run.
The operation is performed in multiple threads, according to the current settings of MaxNumberThreads.
The input A is not altered.
The function always succeeds and returns true for non-empty arrays of integer (non-floating point) element types. Overloads for floating point element types: the function succeeds on non-empty arrays which have at least one element other than NaN and / or 'Infinity' - depending on the setting of ignoreInfinity.
The optional parameter ignoreInfinity is useful, for example, to determine the minimum and maximum values stored inside this array in order to find scaling factors and for normalization purposes. Here, and can be ignored since they would be not useful as scaling factors. For the default value ('false') infinity values are considered regular values and contribute to the result.
For arrays of real element types (min and max is undefined if the function returns . For complex element types the individual parts of min and max determine the limits found among the real parts and among the imaginary parts. If limits could be computed for the real parts of the elements these limits will be stored into the real parts of min and max. Similarly, the limits among the imaginary elements are stored into the imaginary parts of min and max. If no limit could be computed (because all real or all imaginary element parts are all either NaN or Infinity (and ignoreInfinity was ) the corresponding part of min and max will be NaN.and ) the value of the output parameters
[ILNumerics Core Module]