From: Jason H Stover <jhs@math.gcsu.edu>
Date: Mon, 12 Jan 2009 21:21:13 +0000 (-0500)
Subject: fixed update of moments
X-Git-Tag: sav-api~828
X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1feacc810212d66d78dc95269396e36b01a7072;p=pspp

fixed update of moments
---

diff --git a/src/math/covariance-matrix.c b/src/math/covariance-matrix.c
index 32ca9bca9f..b6411fb3d7 100644
--- a/src/math/covariance-matrix.c
+++ b/src/math/covariance-matrix.c
@@ -26,6 +26,7 @@
 #include <libpspp/hash.h>
 #include <libpspp/hash-functions.h>
 #include <math/covariance-matrix.h>
+#include <math/interaction.h>
 #include <math/moments.h>
 #include <string.h>
 #include <xalloc.h>
@@ -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++)