diff options
author | Paul Duncan <pabs@pablotron.org> | 2019-02-03 06:07:13 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2019-02-03 06:07:13 -0500 |
commit | e27b55fb0d9716f53989e75247a807397a60c9ef (patch) | |
tree | d992847ab140ee638c0462207e5a64bfb8dee7a0 /km.h | |
parent | d3bf941f12d1ed453250cb74168a9999bda04a74 (diff) | |
download | kmeans-e27b55fb0d9716f53989e75247a807397a60c9ef.tar.bz2 kmeans-e27b55fb0d9716f53989e75247a807397a60c9ef.zip |
refactor km.h
Diffstat (limited to 'km.h')
-rw-r--r-- | km.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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 *); |