MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / Median

Function Median

src/Statistics.cpp:27–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace libRSF
26{
27 double Median(std::vector<double> &V)
28 {
29 int n = V.size() / 2;
30 std::nth_element(V.begin(), V.begin() + n, V.end());
31 return V[n];
32 }
33
34 double Median(Vector V)
35 {

Callers 1

MADFunction · 0.85

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected