projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
case: Introduce new functions for numbers and substrings in cases.
[pspp]
/
src
/
math
/
covariance.c
diff --git
a/src/math/covariance.c
b/src/math/covariance.c
index cd8ec2ffd1e68b24f783f2ea3c9ce42b7598fae5..44787c679a2a107acd5ef4eb1f7888c12ffbf366 100644
(file)
--- a/
src/math/covariance.c
+++ b/
src/math/covariance.c
@@
-301,7
+301,7
@@
void
covariance_accumulate_pass1 (struct covariance *cov, const struct ccase *c)
{
size_t i, j, m;
covariance_accumulate_pass1 (struct covariance *cov, const struct ccase *c)
{
size_t i, j, m;
- const double weight = cov->wv ? case_
data (c, cov->wv)->f
: 1.0;
+ const double weight = cov->wv ? case_
num (c, cov->wv)
: 1.0;
assert (cov->passes == 2);
if (!cov->pass_one_first_case_seen)
assert (cov->passes == 2);
if (!cov->pass_one_first_case_seen)
@@
-346,7
+346,7
@@
void
covariance_accumulate_pass2 (struct covariance *cov, const struct ccase *c)
{
size_t i, j;
covariance_accumulate_pass2 (struct covariance *cov, const struct ccase *c)
{
size_t i, j;
- const double weight = cov->wv ? case_
data (c, cov->wv)->f
: 1.0;
+ const double weight = cov->wv ? case_
num (c, cov->wv)
: 1.0;
assert (cov->passes == 2);
assert (cov->state >= 1);
assert (cov->passes == 2);
assert (cov->state >= 1);
@@
-464,7
+464,7
@@
void
covariance_accumulate (struct covariance *cov, const struct ccase *c)
{
size_t i, j, m;
covariance_accumulate (struct covariance *cov, const struct ccase *c)
{
size_t i, j, m;
- const double weight = cov->wv ? case_
data (c, cov->wv)->f
: 1.0;
+ const double weight = cov->wv ? case_
num (c, cov->wv)
: 1.0;
assert (cov->passes == 1);
assert (cov->passes == 1);