Stats.Moment Method
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Moment(Int32[], Int32) | Returns the specified raw moment of the elements of an array. |
Moment<T>(T[], Int32) | Returns the specified raw moment of the elements of an array. |
Moment<T>(Vector<T>, Int32) | Returns the specified raw moment of the elements of an array. |
Moment(Int32[], Int32)
Returns the specified raw moment of the elements of an array.
public static double Moment(
int[] values,
int degree
)
Parameters
Return Value
DoubleThe raw moment of degree degree of the elements of values.
Exceptions
Argument | values is null. |
Argument | degree is less than one. |
Moment<T>(T[], Int32)
Returns the specified raw moment of the elements of an array.
public static double Moment<T>(
this T[] values,
int degree
)
Parameters
Type Parameters
- T
Return Value
DoubleThe raw moment of degree degree 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 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).Exceptions
Argument | values is null. |
Argument | degree is less than one. |
Moment<T>(Vector<T>, Int32)
Returns the specified raw moment of the elements of an array.
public static double Moment<T>(
this Vector<T> values,
int degree
)
Parameters
Type Parameters
- T
Return Value
DoubleThe raw moment of degree degree 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).Exceptions
Argument | values is null. |
Argument | degree is less than one. |