Calculates the geometric mean of the given data.
Namespace: CenterSpace.NMath.StatsAssembly: NMathStatsPremium (in NMathStatsPremium.dll) Version: 3.6.0.0
Syntax
| C# |
|---|
public static double GeometricMean( double[] data ) |
| Visual Basic |
|---|
Public Shared Function GeometricMean ( _ data As Double() _ ) As Double |
| Visual C++ |
|---|
public: static double GeometricMean( array<double>^ data ) |
Parameters
- data
- Type: array<System..::..Double>[]()[][]
An array of doubles.
Return Value
Geometric mean.
Remarks
geometric mean = (data[0] * data[1] * ...) ^ (1/n)
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::..InvalidArgumentException | Thrown if data has a length of zero. |