25 #include <mrpt/config.h> 33 #elif defined(HAVE_MALLOC_MALLOC_H) 34 # include <malloc/malloc.h> 61 for (
int i = 0; i < d; i++)
66 for (
int i = 0; i < d; i++)
72 for (
int i = 0; i < d; i++)
73 result += (p1[i] - p2[i]) * (p1[i] - p2[i]);
81 #define ENABLE_KMEANS_ASSERTS 82 #ifdef ENABLE_KMEANS_ASSERTS 84 #define KM_ASSERT(expression) \ 85 (void)((expression) != 0? 0 : __KMeansAssertionFailure(__FILE__, __LINE__, #expression)) 87 #define KM_ASSERT(expression) 97 int u = rand() * RAND_MAX + rand();
98 return ((u %
n) +
n) %
n;
void BASE_IMPEXP memcpy(void *dest, size_t destSize, const void *src, size_t copyCount) MRPT_NO_THROWS
An OS and compiler independent version of "memcpy".
GLenum GLenum GLenum GLenum GLenum scale
Scalar * PointAllocate(int d)
void PointCopy(Scalar *p1, const Scalar *p2, int d)
void PointAdd(Scalar *p1, const Scalar *p2, int d)
void PointScale(Scalar *p, Scalar scale, int d)
int __KMeansAssertionFailure(const char *file, int line, const char *expression)
void PointFree(Scalar *p)
Scalar PointDistSq(const Scalar *p1, const Scalar *p2, int d)