From f741aac2d3319900443d9f38ff4cff48b0484d7a Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 3 Feb 2019 06:04:49 -0500 Subject: fix score --- main.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index af04121..e81475d 100644 --- a/main.c +++ b/main.c @@ -131,18 +131,10 @@ get_score( return 0; } // const size_t num_clusters = ofs + 2; - const float mean_empty_clusters = 1.0 * find_data->rows[ofs].num_empty_clusters / NUM_TESTS; + const float mean_distance = find_data->rows[ofs].distance / NUM_TESTS, + mean_empty = 1.0 * find_data->rows[ofs].num_empty_clusters / NUM_TESTS; - const float ds[3] = { - find_data->rows[ofs - 1].distance / NUM_TESTS, - find_data->rows[ofs + 0].distance / NUM_TESTS, - find_data->rows[ofs + 1].distance / NUM_TESTS, - }; - - return ( - (fabsf(ds[0] - ds[1]) / fabsf(ds[1] - ds[2])) + - -2.0 * mean_empty_clusters - ); + return 1.0 / (mean_distance + mean_empty); } static void -- cgit v1.2.3