Go to the documentation of this file.
35 const bool use_kmeansplusplus_method,
const size_t nPoints,
const size_t k,
36 const size_t dims,
const double*
points,
const size_t attempts,
37 double* out_center,
int* out_assignments)
41 nPoints, k, dims,
const_cast<double*
>(
points), attempts, out_center,
47 const bool use_kmeansplusplus_method,
const size_t nPoints,
const size_t k,
48 const size_t dims,
const float*
points,
const size_t attempts,
49 float* out_center,
int* out_assignments)
52 std::vector<double> points_d(nPoints * dims);
53 std::vector<double> centers_d(k * dims);
55 for (
size_t i = 0; i < nPoints * dims; i++) points_d[i] =
double(
points[i]);
58 nPoints, k, dims, &points_d[0], attempts, ¢ers_d[0],
63 for (
size_t i = 0; i < k * dims; i++)
64 out_center[i] =
float(centers_d[i]);
GLsizei const GLfloat * points
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
double internal_kmeans< float >(const bool use_kmeansplusplus_method, const size_t nPoints, const size_t k, const size_t dims, const float *points, const size_t attempts, float *out_center, int *out_assignments)
Scalar RunKMeans(int n, int k, int d, Scalar *points, int attempts, Scalar *ret_centers, int *ret_assignment)
This base provides a set of functions for maths stuff.
double internal_kmeans< double >(const bool use_kmeansplusplus_method, const size_t nPoints, const size_t k, const size_t dims, const double *points, const size_t attempts, double *out_center, int *out_assignments)
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |