mirror of https://github.com/CGAL/cgal
fix warnings
This commit is contained in:
parent
98f0bc2d86
commit
3a0853a27b
|
|
@ -148,8 +148,9 @@ class K_means_point
|
||||||
public:
|
public:
|
||||||
double data; /**< Location of the point */
|
double data; /**< Location of the point */
|
||||||
std::size_t center_id; /**< Closest center to the point */
|
std::size_t center_id; /**< Closest center to the point */
|
||||||
K_means_point(double data, std::size_t center_id = -1) : data(data),
|
K_means_point(double data,
|
||||||
center_id(center_id) {
|
std::size_t center_id = (std::numeric_limits<std::size_t>::max)())
|
||||||
|
: data(data), center_id(center_id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
operator double() const {
|
operator double() const {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ int main(void)
|
||||||
// unique point generate
|
// unique point generate
|
||||||
std::vector<double> points;
|
std::vector<double> points;
|
||||||
for(std::size_t i = 0; i < center_size; ++i) {
|
for(std::size_t i = 0; i < center_size; ++i) {
|
||||||
points.push_back(i);
|
points.push_back(static_cast<double>(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
// test kmeans, expected result: each point has its own cluster
|
// test kmeans, expected result: each point has its own cluster
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue