aboutsummaryrefslogtreecommitdiff
path: root/km.h
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-02-04 21:31:19 -0500
committerPaul Duncan <pabs@pablotron.org>2019-02-04 21:31:19 -0500
commitcb7823eaa631c43ed2f9620c30e9fbbbe574bd41 (patch)
tree93564b50f7571e94311b91a7c273eb86a31680af /km.h
parent159c42498365913f6ed400e13c77798d041a7d43 (diff)
downloadkmeans-cb7823eaa631c43ed2f9620c30e9fbbbe574bd41.tar.bz2
kmeans-cb7823eaa631c43ed2f9620c30e9fbbbe574bd41.zip
add distance sum
Diffstat (limited to 'km.h')
-rw-r--r--km.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/km.h b/km.h
index 097026e..bc2e3a6 100644
--- a/km.h
+++ b/km.h
@@ -89,6 +89,7 @@ typedef struct {
} km_row_map_t;
typedef struct {
+ const float sum;
const float *means;
const float *variances;
const size_t num_clusters;
@@ -112,7 +113,8 @@ km_solve(
typedef struct {
const km_set_t * const cluster_set;
- const float mean_distance,
+ const float distance_sum,
+ mean_distance,
mean_variance,
mean_cluster_size;