Stats.Harmonic Mean Method
Definition
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Harmonic | Returns the harmonic mean of the elements of an array. |
Harmonic | Returns the harmonic mean of the elements of an array. |
Harmonic | Returns the harmonic mean of the elements of a vector. |
Harmonic | Returns the harmonic mean of the elements of a numerical variable. |
HarmonicMean(Double[])
Returns the harmonic mean of the elements of an array.
public static double HarmonicMean(
double[] values
)
Parameters
- values Double[]
- A Double array.
Return Value
DoubleThe harmonic mean of the elements of values.
Remarks
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the values values.
Exceptions
ArgumentNullException | values is null. |
HarmonicMean(Int32[])
Returns the harmonic mean of the elements of an array.
public static double HarmonicMean(
int[] values
)
Parameters
- values Int32[]
- An Int32 array.
Return Value
DoubleThe harmonic mean of the elements of values.
Remarks
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the values values.
The harmonic mean is a Double value.
Exceptions
ArgumentNullException | values is null. |
HarmonicMean(Vector<Double>)
Returns the harmonic mean of the elements of a vector.
public static double HarmonicMean(
this Vector<double> values
)
Parameters
- values Vector<Double>
- A vector.
Return Value
DoubleThe 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<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).Remarks
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the values values.
Exceptions
ArgumentNullException | values is null. |
HarmonicMean<T>(Vector<T>)
Returns the harmonic mean of the elements of a numerical variable.
public static double HarmonicMean<T>(
Vector<T> values
)
Parameters
Type Parameters
- T
Return Value
DoubleThe harmonic mean of the elements of values.
Remarks
The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the values values.
Exceptions
ArgumentNullException | values is null. |