projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Separate table functions that format their arguments from those that don't.
[pspp]
/
src
/
math
/
linreg.c
diff --git
a/src/math/linreg.c
b/src/math/linreg.c
index 811f9d23a5f709877a55c6b535e0b61938e1ce1d..8028697c6b7f3410b12927a0fe7ae1d82c5a6b4b 100644
(file)
--- a/
src/math/linreg.c
+++ b/
src/math/linreg.c
@@
-669,6
+669,7
@@
rearrange_covariance_matrix (const struct covariance_matrix *cm, pspp_linreg_cac
size_t i;
size_t j;
size_t k;
size_t i;
size_t j;
size_t k;
+ size_t n_coeffs = 0;
assert (cm != NULL);
cov = covariance_to_design (cm);
assert (cm != NULL);
cov = covariance_to_design (cm);
@@
-676,11
+677,11
@@
rearrange_covariance_matrix (const struct covariance_matrix *cm, pspp_linreg_cac
assert (c != NULL);
assert (cov->m->size1 > 0);
assert (cov->m->size2 == cov->m->size1);
assert (c != NULL);
assert (cov->m->size1 > 0);
assert (cov->m->size2 == cov->m->size1);
- permutation = xnmalloc (1 + c->n_indeps, sizeof (*permutation));
model_vars = xnmalloc (1 + c->n_indeps, sizeof (*model_vars));
/*
Put the model variables in the right order in MODEL_VARS.
model_vars = xnmalloc (1 + c->n_indeps, sizeof (*model_vars));
/*
Put the model variables in the right order in MODEL_VARS.
+ Count the number of coefficients.
*/
for (i = 0; i < c->n_indeps; i++)
{
*/
for (i = 0; i < c->n_indeps; i++)
{
@@
-688,6
+689,8
@@
rearrange_covariance_matrix (const struct covariance_matrix *cm, pspp_linreg_cac
}
model_vars[i] = c->depvar;
result = covariance_matrix_create (1 + c->n_indeps, model_vars);
}
model_vars[i] = c->depvar;
result = covariance_matrix_create (1 + c->n_indeps, model_vars);
+ permutation = xnmalloc (design_matrix_get_n_cols (result), sizeof (*permutation));
+
for (j = 0; j < cov->m->size2; j++)
{
k = 0;
for (j = 0; j < cov->m->size2; j++)
{
k = 0;