From 33a722132491ebdd31722f0cada0f81f6b082282 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 3 Feb 2019 18:36:52 -0500 Subject: cluster init refactoring, fix best sort, add km_score() --- util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index cef238c..fa54ce0 100644 --- a/util.h +++ b/util.h @@ -21,4 +21,12 @@ exit(EXIT_FAILURE); \ } while (0) +static inline float +km_score( + const float mean_distance, + const size_t num_empty +) { + return 1.0 / (mean_distance + num_empty); +} + #endif /* UTIL_H */ -- cgit v1.2.3