abrank

void abrank(double* first, double* last, double* irank, RankType type)

Ranks the values of the elements in [first, last) using the scoring method used in the Ansari-Bradley test returning the table of ranks in [irank, irank + (last - first)). The input elements of [first, last) are not changed. The parameter ties determines the method used to assign ranks to tied values.

Parameters:
firstBeginning iterator for the container of elements.
lastEnding iterator for the container of elements.
irankBeginning iterator of the ranks container.
typeType of ranking to use.

Returns:
On return, the elements of [first, last) are replaced with thier Ansari-Bradley ranks.

Usage:

double x[] = {2.0, 1.0, 3.0, 5.0, 4.0, 5.0};
double y[6];
abrank(x, x + 6, y, RANK_HIGH);

Header:
#include "ranking.h"

See Also:
RankType