diff options
Diffstat (limited to 'km.h')
-rw-r--r-- | km.h | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -8,7 +8,7 @@ typedef struct km_rand_src_t_ km_rand_src_t; // random number source callbacks typedef struct { - bool (*fill)(km_rand_src_t * const, const size_t, float * const); + _Bool (*fill)(km_rand_src_t * const, const size_t, float * const); void (*fini)(km_rand_src_t * const); } km_rand_src_cbs_t; @@ -79,4 +79,26 @@ km_clusters_solve( void * const ); +typedef struct { + const km_set_t * const cluster_set; + const size_t num_clusters; + const float mean_distance; + const size_t num_empty_clusters; +} km_search_row_t; + +typedef void (*km_search_row_cb_t)( + const km_search_row_t * const, + void * +); + +// repeatedly test different cluster sizes and report results +_Bool +km_search( + const km_set_t * const set, + const size_t max_clusters, + const size_t num_tests, + const km_search_row_cb_t on_row, + void *cb_data +); + #endif /* KM_H */ |