mirror of https://github.com/CGAL/cgal
int -> size_t to remove warnings
This commit is contained in:
parent
dd485f4839
commit
7cf48beb41
|
|
@ -155,7 +155,7 @@ public:
|
||||||
neighbor_values.push_back(values[it->first]);
|
neighbor_values.push_back(values[it->first]);
|
||||||
}
|
}
|
||||||
// Find median.
|
// Find median.
|
||||||
int half_neighbor_count = neighbor_values.size() / 2;
|
std::size_t half_neighbor_count = neighbor_values.size() / 2;
|
||||||
std::nth_element(neighbor_values.begin(),
|
std::nth_element(neighbor_values.begin(),
|
||||||
neighbor_values.begin() + half_neighbor_count, neighbor_values.end());
|
neighbor_values.begin() + half_neighbor_count, neighbor_values.end());
|
||||||
double median_sdf = neighbor_values[half_neighbor_count];
|
double median_sdf = neighbor_values[half_neighbor_count];
|
||||||
|
|
|
||||||
|
|
@ -134,9 +134,9 @@ public:
|
||||||
// this can not select an already selected item since either (by considering that upper bounds returns greater)
|
// this can not select an already selected item since either (by considering that upper bounds returns greater)
|
||||||
// - aready selected item is at 0, and its value is 0.0
|
// - aready selected item is at 0, and its value is 0.0
|
||||||
// - or its value is equal to value of previous element
|
// - or its value is equal to value of previous element
|
||||||
int selection_index = std::upper_bound(distance_square_cumulative.begin(),
|
std::size_t selection_index = std::upper_bound(
|
||||||
distance_square_cumulative.end(), random_ds)
|
distance_square_cumulative.begin(), distance_square_cumulative.end(), random_ds)
|
||||||
- distance_square_cumulative.begin();
|
- distance_square_cumulative.begin();
|
||||||
|
|
||||||
centers.push_back(points[selection_index]);
|
centers.push_back(points[selection_index]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue