aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-02-03 06:07:13 -0500
committerPaul Duncan <pabs@pablotron.org>2019-02-03 06:07:13 -0500
commite27b55fb0d9716f53989e75247a807397a60c9ef (patch)
treed992847ab140ee638c0462207e5a64bfb8dee7a0
parentd3bf941f12d1ed453250cb74168a9999bda04a74 (diff)
downloadkmeans-e27b55fb0d9716f53989e75247a807397a60c9ef.tar.bz2
kmeans-e27b55fb0d9716f53989e75247a807397a60c9ef.zip
refactor km.h
-rw-r--r--km.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/km.h b/km.h
index 9a58a6d..ae1791d 100644
--- a/km.h
+++ b/km.h
@@ -73,6 +73,15 @@ _Bool km_set_normalize(km_set_t * const);
// get pointer to data set row
float *km_set_get_row(const km_set_t *, const size_t);
+// init a set with num_clusters clusters of shape num_floats by picking
+// random cluster centers
+_Bool km_set_init_rand_clusters(
+ km_set_t *,
+ const size_t,
+ const size_t,
+ km_rand_t *
+);
+
typedef struct {
float d2;
size_t cluster;
@@ -84,15 +93,6 @@ typedef struct {
const size_t num_clusters;
} km_solve_stats_t;
-// init a set with num_clusters clusters of shape num_floats by picking
-// random cluster centers
-_Bool km_set_init_rand_clusters(
- km_set_t *,
- const size_t,
- const size_t,
- km_rand_t *
-);
-
typedef struct {
void (*on_step)(const km_set_t *, const km_row_map_t *, void *);
void (*on_stats)(const km_set_t *, const km_solve_stats_t *, void *);