Stats.Geometric Mean Method
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Geometric | Returns the geometric mean of the elements of an array. |
Geometric | Returns the geometric mean of the elements of an array. |
Geometric | Returns the geometric mean of the elements of a vector. |
Geometric | Returns the geometric mean of the elements of a numerical variable. |
GeometricMean(Double[])
Returns the geometric mean of the elements of an array.
public static double GeometricMean(
double[] values
)
Parameters
Return Value
DoubleThe geometric mean of the elements of values.
Exceptions
Argument | values is null. |
GeometricMean(Int32[])
Returns the geometric mean of the elements of an array.
public static double GeometricMean(
int[] values
)
Parameters
Return Value
DoubleThe geometric mean of the elements of values.
Remarks
The geometric mean is a Double value.
Exceptions
Argument | values is null. |
Invalid | One or more of the values values is negative. |
GeometricMean(Vector<Double>)
Returns the geometric mean of the elements of a vector.
public static double GeometricMean(
this Vector<double> values
)
Parameters
Return Value
DoubleThe geometric mean of the elements of values.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Argument | values is null. |
Invalid | One or more of the values values is negative. |
GeometricMean<T>(Vector<T>)
Returns the geometric mean of the elements of a numerical variable.
public static double GeometricMean<T>(
Vector<T> values
)
Parameters
Type Parameters
- T
Return Value
DoubleThe geometric mean of the elements of values.
Exceptions
Argument | values is null. |
Invalid | One or more of the values values is negative. |