diff options
author | Paul Duncan <pabs@pablotron.org> | 2019-02-03 15:10:44 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2019-02-03 15:10:44 -0500 |
commit | df06fe6084b1c1673348050309a3a0cb99b6634f (patch) | |
tree | bb51c86aee01ca235f7c6feb5fb08808c307e2ed /km.h | |
parent | 68a4d7a514578f1360559c84ac08e3a1e2719826 (diff) | |
download | kmeans-df06fe6084b1c1673348050309a3a0cb99b6634f.tar.bz2 kmeans-df06fe6084b1c1673348050309a3a0cb99b6634f.zip |
add cluster support to gen-data.rb, show centroids on generated png
Diffstat (limited to 'km.h')
-rw-r--r-- | km.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -131,6 +131,12 @@ typedef _Bool (*km_find_fini_cb_t)( void *cb_data ); +typedef _Bool (*km_find_best_cb_t)( + const float score, + const km_set_t * const cluster_set, + void *cb_data +); + typedef void (*km_find_data_cb_t)( const km_find_data_t * const, void * @@ -143,6 +149,7 @@ typedef struct { km_find_init_cb_t on_init; km_find_fini_cb_t on_fini; km_find_data_cb_t on_data; + km_find_best_cb_t on_best; } km_find_cbs_t; // repeatedly test different cluster sizes and report results @@ -160,6 +167,7 @@ km_set_draw( uint8_t * const rgb, const size_t width, const size_t height, + const int dot_size, const uint32_t color ); |