From: Jason H Stover Date: Mon, 12 Jan 2009 21:21:13 +0000 (-0500) Subject: fixed update of moments X-Git-Tag: v0.7.1~8 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1feacc810212d66d78dc95269396e36b01a7072;p=pspp-builds.git fixed update of moments --- diff --git a/src/math/covariance-matrix.c b/src/math/covariance-matrix.c index 32ca9bca..b6411fb3 100644 --- a/src/math/covariance-matrix.c +++ b/src/math/covariance-matrix.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -588,7 +589,7 @@ covariance_accumulate_pairwise (struct covariance_matrix *cov, if (!var_is_value_missing (v_variables[i], val1, cov->missing_value)) { cat_value_update (v_variables[i], val1); - if (var_is_alpha (v_variables[i])) + if (var_is_numeric (v_variables[i])) cov->update_moments (cov, i, val1->f); for (j = i; j < cov->n_variables; j++) @@ -643,7 +644,7 @@ covariance_accumulate_listwise (struct covariance_matrix *cov, { val1 = case_data (ccase, v_variables[i]); cat_value_update (v_variables[i], val1); - if (var_is_alpha (v_variables[i])) + if (var_is_numeric (v_variables[i])) cov->update_moments (cov, i, val1->f); for (j = i; j < cov->n_variables; j++)