aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c14
1 files changed, 3 insertions, 11 deletions
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