MCPcopy Create free account
hub / github.com/ceres-solver/ceres-solver / Median

Function Median

examples/bal_problem.cc:64–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64double Median(std::vector<double>* data) {
65 auto mid_point = data->begin() + data->size() / 2;
66 std::nth_element(data->begin(), mid_point, data->end());
67 return *mid_point;
68}
69
70} // namespace
71

Callers 1

NormalizeMethod · 0.85

Calls 3

beginMethod · 0.45
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected