X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Flinreg%2Flinreg.c;h=9224cc6bad9332769a8797b783719d235a2cbb82;hb=470affdb48180aebfa764941bbdb353062978444;hp=51f77b882e0b35546a0b80bc9479bababdbdd1f5;hpb=538e1f5d35f8a48d43401b2c7abf7663219b638f;p=pspp diff --git a/src/math/linreg/linreg.c b/src/math/linreg/linreg.c index 51f77b882e..9224cc6bad 100644 --- a/src/math/linreg/linreg.c +++ b/src/math/linreg/linreg.c @@ -18,6 +18,7 @@ Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. */ +#include #include #include @@ -53,7 +54,7 @@ */ #include -#include +#include #include #include /* @@ -97,7 +98,7 @@ int pspp_linreg_get_vars (const void *c_, struct variable **v) { const pspp_linreg_cache *c = c_; - struct pspp_linreg_coeff *coef = NULL; + struct pspp_coeff *coef = NULL; const struct variable *tmp; int i; int result = 0; @@ -113,17 +114,17 @@ pspp_linreg_get_vars (const void *c_, struct variable **v) /* Start at c->coeff[1] to avoid the intercept. */ - v[result] = (struct variable *) pspp_linreg_coeff_get_var (c->coeff[1], 0); + v[result] = (struct variable *) pspp_coeff_get_var (c->coeff[1], 0); result = (v[result] == NULL) ? 0 : 1; for (coef = c->coeff[2]; coef < c->coeff[c->n_coeffs]; coef++) { - tmp = pspp_linreg_coeff_get_var (coef, 0); + tmp = pspp_coeff_get_var (coef, 0); assert (tmp != NULL); /* Repeated variables are likely to bunch together, at the end of the array. */ i = result - 1; - while (i >= 0 && (v[i]->index != tmp->index)) + while (i >= 0 && v[i] != tmp) { i--; } @@ -187,7 +188,7 @@ pspp_linreg_cache_free (void *m) gsl_matrix_free (c->cov); for (i = 0; i < c->n_coeffs; i++) { - pspp_linreg_coeff_free (c->coeff[i]); + pspp_coeff_free (c->coeff[i]); } free (c); return true;