aboutsummaryrefslogtreecommitdiff
path: root/km-solve.c
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-02-04 09:36:52 -0500
committerPaul Duncan <pabs@pablotron.org>2019-02-04 09:36:52 -0500
commitf496f3f1ce5bd068930382f7516494abdbf62489 (patch)
treef912fff2b50e04cfc4585fa6d8f6afcb05460a68 /km-solve.c
parent4a4373f113b607f715badd2ea06cba461fe3bbcf (diff)
downloadkmeans-f496f3f1ce5bd068930382f7516494abdbf62489.tar.bz2
kmeans-f496f3f1ce5bd068930382f7516494abdbf62489.zip
add kmeans++ method
Diffstat (limited to 'km-solve.c')
-rw-r--r--km-solve.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/km-solve.c b/km-solve.c
index 4560c67..9eac13c 100644
--- a/km-solve.c
+++ b/km-solve.c
@@ -5,23 +5,6 @@
#include "util.h"
#include "km.h"
-// calculate squared euclidean distance between two points
-static float
-distance_squared(
- const size_t num_floats,
- const float * const a,
- const float * const b
-) {
- float r = 0.0;
-
- for (size_t i = 0; i < num_floats; i++) {
- r += (b[i] - a[i]) * (b[i] - a[i]);
- }
-
- // return squared distance
- return r;
-}
-
// alloc and initialize row map
static km_row_map_t *
km_row_map_init(