Returns the harmonic mean of the elements of an array.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function HarmonicMean ( _ data As Integer() _ ) As Double |
| C# |
|---|
public static double HarmonicMean ( int[] data ) |
| C++ |
|---|
public: static double HarmonicMean ( array<int>^ data ) |
Parameters
- data ()
- An Int32 array.
Return Value
The harmonic mean of the elements of data.
Remarks
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the data values.
The harmonic mean is a Double value.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | data is nullNothingnullptr. |