X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fquick-cluster.c;h=f4c64b09977fff52caa8f83e9f172ad75dff14a5;hb=bac6dafc3c5ee45b2321615a8a36a2ddf93a2b1d;hp=4f34e4f0a8ef0eabcb955d4eb1588d634264f33e;hpb=e8fd8bbc19102dd21c25433d9c410ccb174931db;p=pspp diff --git a/src/language/stats/quick-cluster.c b/src/language/stats/quick-cluster.c index 4f34e4f0a8..f4c64b0997 100644 --- a/src/language/stats/quick-cluster.c +++ b/src/language/stats/quick-cluster.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -187,21 +186,7 @@ matrix_mindist (const gsl_matrix *m, int *mn, int *mm) } } - return sqrt (mindist); -} - - -static void -dump_matrix (const gsl_matrix *m) -{ - size_t i, j; - - for (i = 0 ; i < m->size1; ++i) - { - for (j = 0 ; j < m->size2; ++j) - printf ("%02f ", gsl_matrix_get (m, i, j)); - printf ("\n"); - } + return mindist; } @@ -220,7 +205,7 @@ dist_from_case (const struct Kmeans *kmeans, const struct ccase *c, const struct dist += pow2 (gsl_matrix_get (kmeans->centers, which, j) - val->f); } - return sqrt (dist); + return dist; } /* Return the minimum distance of the group WHICH and all other groups */ @@ -247,7 +232,7 @@ min_dist_from (const struct Kmeans *kmeans, const struct qc *qc, int which) } } - return sqrt (mindist); + return mindist; } @@ -349,7 +334,6 @@ kmeans_get_nearest_group (const struct Kmeans *kmeans, struct ccase *c, const st dist += pow2 (gsl_matrix_get (kmeans->centers, i, j) - val->f); } - dist = sqrt (dist); if (dist < mindist0) {