Calculates the harmonic mean of the given data.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public static double HarmonicMean( int[] data ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function HarmonicMean ( _ data As Integer() _ ) As Double |
| Visual C++ |
|---|
public: static double HarmonicMean( array<int>^ data ) |
Parameters
- data
- Type: array<
System..::.Int32
>[]()[]
An array of doubles.
Return Value
Harmonic mean.
Remarks
Harmonic mean = n / (( 1.0 / data[0]) + (1.0 / data[1]) + ...)