Returns the harmonic mean of the elements of a vector.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Shared Function HarmonicMean ( _ data As Vector _ ) As Double |
| C# |
|---|
public static double HarmonicMean ( Vector data ) |
| C++ |
|---|
public: static double HarmonicMean ( Vector^ data ) |
Parameters
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.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | data is nullNothingnullptr. |