Stats.Min Max Method
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Min | Returns the minimum and maximum value of the elements of a numerical variable. |
Min | Returns the maximum value of the elements of a sequence. |
Min | Returns the smallest and largest value of the elements of an array. |
MinMax<T>(Vector<T>)
Returns the minimum and maximum value of the elements of a numerical variable.
public static (T , T ) MinMax<T>(
Vector<T> values
)
Parameters
Type Parameters
- T
Return Value
ValueTuple<T, T>A two-element array containing the minimum and maximum value of the elements of values.
Exceptions
Argument | values is null. |
MinMax<T>(IEnumerable<T>, Boolean)
Returns the maximum value of the elements of a sequence.
public static (T , T ) MinMax<T>(
IEnumerable<T> values,
bool skipMissingValues = false
)
where T : Object, IComparable<T>
Parameters
- values IEnumerable<T>
- A Double array.
- skipMissingValues Boolean (Optional)
- Optional. Specifies whether missing values should be excluded from the calculation. The default is false.
Type Parameters
- T
- The type of the elements of the sequence.
Return Value
ValueTuple<T, T>The maximum value of the elements of values.
Exceptions
Argument | values is null. |
MinMax<T>(IEnumerable<T>, IComparer<T>, Boolean)
Returns the smallest and largest value of the elements of an array.
public static (T , T ) MinMax<T>(
IEnumerable<T> values,
IComparer<T> comparer,
bool skipMissingValues = false
)
Parameters
- values IEnumerable<T>
- A Double array.
- comparer IComparer<T>
- An IComparer<T> object that is used to compare instances of the generic type.
- skipMissingValues Boolean (Optional)
- Optional. Specifies whether missing values should be excluded from the calculation. The default is false.
Type Parameters
- T
- The type
Return Value
ValueTuple<T, T>The maximum value of the elements of values.
Exceptions
Argument | values is null. |