X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fquick-cluster.c;h=61f0cea02ade6c2477c19f3855371ec9df866a9c;hb=912833f9331784d692ade66c76bffb5497b890e0;hp=0a2b75de252b7e9e7f5405c923a2700fbb15d05b;hpb=654d2360a1dce57033dbf0030d17522d3c797987;p=pspp diff --git a/src/language/stats/quick-cluster.c b/src/language/stats/quick-cluster.c index 0a2b75de25..61f0cea02a 100644 --- a/src/language/stats/quick-cluster.c +++ b/src/language/stats/quick-cluster.c @@ -190,20 +190,6 @@ matrix_mindist (const gsl_matrix *m, int *mn, int *mm) } -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 the distance of C from the group whose index is WHICH */ static double dist_from_case (const struct Kmeans *kmeans, const struct ccase *c, const struct qc *qc, int which) @@ -752,9 +738,9 @@ cmd_quick_cluster (struct lexer *lexer, struct dataset *ds) { if (lex_match_id (lexer, "CLUSTERS")) { - if (lex_force_match (lexer, T_LPAREN)) + if (lex_force_match (lexer, T_LPAREN) && + lex_force_int (lexer)) { - lex_force_int (lexer); qc.ngroups = lex_integer (lexer); if (qc.ngroups <= 0) { @@ -767,9 +753,9 @@ cmd_quick_cluster (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "CONVERGE")) { - if (lex_force_match (lexer, T_LPAREN)) + if (lex_force_match (lexer, T_LPAREN) && + lex_force_num (lexer)) { - lex_force_num (lexer); qc.epsilon = lex_number (lexer); if (qc.epsilon <= 0) { @@ -782,9 +768,9 @@ cmd_quick_cluster (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "MXITER")) { - if (lex_force_match (lexer, T_LPAREN)) + if (lex_force_match (lexer, T_LPAREN) && + lex_force_int (lexer)) { - lex_force_int (lexer); qc.maxiter = lex_integer (lexer); if (qc.maxiter <= 0) {