11 struct compareByDistance {
21 std::vector<GlobalPoint>
pts;
23 std::vector<PointAndDistance> sorted_values(
values.size());
24 partial_sort_copy(
values.begin(),
values.end(), sorted_values.begin(), sorted_values.end(), compareByDistance());
26 std::vector<PointAndDistance>::iterator
end = sorted_values.end();
27 std::vector<PointAndDistance>::iterator
begin = sorted_values.begin();
32 unsigned int min_num =
values.size() < 30 ?
values.size() : 30;
35 if (
values.size() > 2 * min_num)
36 min_num = (
int)
values.size() / 2;
38 while (
pts.size() < min_num) {
40 std::vector<PointAndDistance>::iterator
i;
42 pts.push_back(
i->first);
std::pair< GlobalPoint, float > PointAndDistance
GlobalPoint hsm_3d(const std::vector< GlobalPoint > &values)
cordinate wise half sample mode in 3d
ret
prodAgent to be discontinued
static const double pts[33]
GlobalPoint operator()(const std::vector< PointAndDistance > &values) const override
std::pair< GlobalPoint, float > PointAndDistance
SubsetHsmModeFinder3d * clone() const override