From: John Darrington Date: Fri, 22 Jul 2011 13:03:10 +0000 (+0200) Subject: Move call to categoricals_done earlier in the covariance code X-Git-Tag: v0.7.9~191 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98780edcc33b536d75b5ce3a55b8f2d1a363d99c;p=pspp-builds.git Move call to categoricals_done earlier in the covariance code --- diff --git a/src/language/stats/glm.c b/src/language/stats/glm.c index 8e3b07f4..1eaf1a98 100644 --- a/src/language/stats/glm.c +++ b/src/language/stats/glm.c @@ -427,8 +427,6 @@ run_glm (struct glm_spec *cmd, struct casereader *input, } casereader_destroy (reader); - categoricals_done (ws.cats); - for (reader = input; (c = casereader_read (reader)) != NULL; case_unref (c)) { diff --git a/src/math/covariance.c b/src/math/covariance.c index b37da3d2..f64e89d1 100644 --- a/src/math/covariance.c +++ b/src/math/covariance.c @@ -347,6 +347,9 @@ covariance_accumulate_pass2 (struct covariance *cov, const struct ccase *c) assert (cov->state == 1); cov->state = 2; + if (cov->categoricals) + categoricals_done (cov->categoricals); + cov->dim = cov->n_vars; if (cov->categoricals) @@ -362,9 +365,6 @@ covariance_accumulate_pass2 (struct covariance *cov, const struct ccase *c) cov->moments[i] = resize_matrix (cov->moments[i], cov->dim); } - // if (cov->categoricals) - // categoricals_done (cov->categoricals); - /* Populate the moments matrices with the categorical value elements */ for (i = cov->n_vars; i < cov->dim; ++i) {