Stats.HarmonicMeanAs<T, TResult> Method

Returns the harmonic mean of the elements of a vector.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.0
C#
public static TResult HarmonicMeanAs<T, TResult>(
	this Vector<T> values
)

Parameters

values  Vector<T>
A vector.

Type Parameters

T
TResult

Return Value

TResult
The harmonic 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<T>. 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).

Remarks

The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the values values.

Exceptions

ArgumentNullException

values is null.

See Also