}
-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)
{
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)
{
}
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)
{
}
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)
{