Returns the ranks of each element in a data set using the specified
sort order.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public static int[] Ranks( int[] data, SortingType order ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Ranks ( _ data As Integer(), _ order As SortingType _ ) As Integer() |
| Visual C++ |
|---|
public: static array<int>^ Ranks( array<int>^ data, SortingType order ) |
Parameters
- data
- Type: array<
System..::.Int32
>[]()[]
An array.
- order
- Type: CenterSpace.NMath.Stats..::.SortingType
Ascending or descending.
Return Value
Ranks.
Remarks
For example, 4.0, 1.2, 3.4, 1.2, -1.4 in descending
order would return 1, 3, 2, 3, 5