[7fa5e8]: src / modules / bugs / functions / Rank.h Maximize Restore History

Download this file

Rank.h    35 lines (29 with data), 774 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef FUNC_RANK_H_
#define FUNC_RANK_H_
#include <function/VectorFunction.h>
namespace bugs {
/**
* @short Rank function
*
* Calculates the sample ranks of the values in a vector. The ranks
* define a permutation that is the inverse of the one returned
* by the Order function.
*
* <pre>
* y <- rank(x[])
* </pre>
*
* @see Order
*/
class Rank : public VectorFunction
{
public:
Rank ();
void evaluate(double *value,
std::vector<double const *> const &args,
std::vector<unsigned int> const &lengths) const;
unsigned int length(std::vector<unsigned int> const &args) const;
bool isDiscreteValued(std::vector<bool> const &mask) const;
};
}
#endif /* FUNC_RANK_H_ */