projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://jmd@git.sv.gnu.org/srv/git/pspp
[pspp-builds.git]
/
src
/
math
/
covariance-matrix.c
diff --git
a/src/math/covariance-matrix.c
b/src/math/covariance-matrix.c
index 32ca9bca9f7a20f1d7bd6d899027af54b6639998..4f14a7c60517f7b97379d0e963a8eff0c74fce1d 100644
(file)
--- 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 <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>
#include <math/moments.h>
#include <string.h>
#include <xalloc.h>
@@
-399,14
+400,14
@@
match_nodes (const struct covariance_accumulator *c,
}
if (var_is_numeric (v1) && var_is_alpha (v2))
{
}
if (var_is_numeric (v1) && var_is_alpha (v2))
{
- if (compare_values_short (val2, c->val2, v2))
+ if (
!
compare_values_short (val2, c->val2, v2))
{
return 0;
}
}
if (var_is_alpha (v1) && var_is_numeric (v2))
{
{
return 0;
}
}
if (var_is_alpha (v1) && var_is_numeric (v2))
{
- if (compare_values_short (val1, c->val1, v1))
+ if (
!
compare_values_short (val1, c->val1, v1))
{
return 0;
}
{
return 0;
}
@@
-415,7
+416,7
@@
match_nodes (const struct covariance_accumulator *c,
{
if (compare_values_short (val1, c->val1, v1))
{
{
if (compare_values_short (val1, c->val1, v1))
{
- if (compare_values_short (val2, c->val2, v2))
+ if (
!
compare_values_short (val2, c->val2, v2))
{
return 0;
}
{
return 0;
}
@@
-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_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++)
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);
{
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++)
cov->update_moments (cov, i, val1->f);
for (j = i; j < cov->n_variables; j++)