help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] gsl ranking of vector elements


From: Stefan Bleuler
Subject: [Help-gsl] gsl ranking of vector elements
Date: Wed, 26 Jan 2005 11:23:18 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

The method proposed in the gsl documentation for calculating the ranks of vector elements is to use sort and then look at the indices. The problem is that the order for equal values is "random" and thus their ranks are.

I would like to assign equal non-integer ranks to equal elements.

Example:

v = [1 3 3 5]
ranks(v) = [1 2.5 2.5 4]

Is there a straight forward way to do it in gsl?

Thanks.

Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]