Stats.RanksInto<T> Method

Returns the ranks of the observations.

Definition

Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.2
C#
public static double RanksInto<T>(
	this ReadOnlySpan<T> values,
	RankTiebreaker tiebreaker,
	T tolerance,
	Span<double> ranks
)

Parameters

values  ReadOnlySpan<T>
An array of values.
tiebreaker  RankTiebreaker
A RankTiebreaker value that specifies how to assign the ranks of tied observations.
tolerance  T
The absolute tolerance used to decide whether two values are considered equal.
ranks  Span<Double>
 

Type Parameters

T

Return Value

Double
A Double array containing the ranks of each observation.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ReadOnlySpan<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 smallest observation has rank 1. Observations that are within the value tolerance of each other are considered equal. If several values are equal, then the rank is assigned using the method specified by tiebreaker. The rank for missing values is NaN.

Exceptions

ArgumentNullException

values is null.

See Also