Stats.GeometricMean Method

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

GeometricMean(Double[]) Returns the geometric mean of the elements of an array.
GeometricMean(Int32[]) Returns the geometric mean of the elements of an array.
GeometricMean(Vector<Double>) Returns the geometric mean of the elements of a vector.
GeometricMean<T>(Vector<T>) Returns the geometric mean of the elements of a numerical variable.

GeometricMean(Double[])

Returns the geometric mean of the elements of an array.
C#
public static double GeometricMean(
	double[] values
)

Parameters

values  Double[]
A Double array.

Return Value

Double
The geometric mean of the elements of values.

Exceptions

ArgumentNullExceptionvalues is null.

GeometricMean(Int32[])

Returns the geometric mean of the elements of an array.
C#
public static double GeometricMean(
	int[] values
)

Parameters

values  Int32[]
An Int32 array.

Return Value

Double
The geometric mean of the elements of values.

Remarks

The geometric mean is a Double value.

Exceptions

ArgumentNullExceptionvalues is null.
InvalidOperationExceptionOne or more of the values values is negative.

GeometricMean(Vector<Double>)

Returns the geometric mean of the elements of a vector.
C#
public static double GeometricMean(
	this Vector<double> values
)

Parameters

values  Vector<Double>
A vector.

Return Value

Double
The 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

ArgumentNullExceptionvalues is null.
InvalidOperationExceptionOne or more of the values values is negative.

GeometricMean<T>(Vector<T>)

Returns the geometric mean of the elements of a numerical variable.
C#
public static double GeometricMean<T>(
	Vector<T> values
)

Parameters

values  Vector<T>
A Vector<T>.

Type Parameters

T

Return Value

Double
The geometric mean of the elements of values.

Exceptions

ArgumentNullExceptionvalues is null.
InvalidOperationExceptionOne or more of the values values is negative.

See Also