From b727c9bd5a7c968cc4f00d57ce0cdf9da359edf0 Mon Sep 17 00:00:00 2001 From: pavanvpatil Date: Sat, 29 Oct 2022 19:55:14 +0530 Subject: [PATCH] fixed bugs of kmeans --- iPDC/src/Kmeans.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/iPDC/src/Kmeans.c b/iPDC/src/Kmeans.c index 1fd95b7..aa50ca2 100644 --- a/iPDC/src/Kmeans.c +++ b/iPDC/src/Kmeans.c @@ -11,14 +11,14 @@ struct kmeans1 { int idcode; - unsigned long long int count_A = 1000; - unsigned long long int count_B = 1000; - unsigned long long int count_C = 1000; - long double A = 50; - long double B = 49; - long double C = 51; + unsigned long long int count_A; + unsigned long long int count_B; + unsigned long long int count_C; + long double A; + long double B; + long double C; struct kmeans1 *next; -} +}; struct kmeans1 *headk = NULL; @@ -38,8 +38,8 @@ gboolean kmeans(struct data_frame *df) } else { - struct kmeans1 *temp == headk; - struct kmeans1 *previous == NULL; + struct kmeans1 *temp = headk; + struct kmeans1 *previous = NULL; while (temp != NULL) { if (temp->idcode == to_intconvertor(df->idcode))