From: Jason Stover Date: Wed, 19 Apr 2006 01:20:33 +0000 (+0000) Subject: Added pointer to residual variable to linreg cache X-Git-Tag: v0.6.0~966 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e0bcaf730de6ad07b874cd02fba32ccfb2a6f47;p=pspp-builds.git Added pointer to residual variable to linreg cache --- diff --git a/src/math/linreg/ChangeLog b/src/math/linreg/ChangeLog index 7fecac64..4743b08e 100644 --- a/src/math/linreg/ChangeLog +++ b/src/math/linreg/ChangeLog @@ -1,3 +1,10 @@ +2006-04-18 Jason Stover + + * linreg.h: Added a pointer to a variable to store the resduals. + + * linreg.c (pspp_linreg_cache_alloc): Initialize the residual + variable pointer to NULL. + 2006-04-17 Jason Stover * linreg.c (pspp_linreg_cache_free): Accept a pointer of type diff --git a/src/math/linreg/linreg.c b/src/math/linreg/linreg.c index ec1354f3..2945b26d 100644 --- a/src/math/linreg/linreg.c +++ b/src/math/linreg/linreg.c @@ -116,7 +116,8 @@ pspp_linreg_cache_alloc (size_t n, size_t p) */ c->method = PSPP_LINREG_SWEEP; c->predict = pspp_linreg_predict; - c->residual = pspp_linreg_residual; + c->residual = pspp_linreg_residual; /* The procedure to comput my residuals. */ + c->resid = NULL; /* The variable storing my residuals. */ return c; } diff --git a/src/math/linreg/linreg.h b/src/math/linreg/linreg.h index a3b0c780..dbdc23c0 100644 --- a/src/math/linreg/linreg.h +++ b/src/math/linreg/linreg.h @@ -42,8 +42,6 @@ enum */ struct pspp_linreg_opts_struct { - int resid; /* Should the residuals be returned? */ - int get_depvar_mean_std; int *get_indep_mean_std; /* Array of booleans dictating which @@ -165,6 +163,7 @@ struct pspp_linreg_cache_struct const union value **, const union value *, const void *, int); + struct variable *resid; }; typedef struct pspp_linreg_cache_struct pspp_linreg_cache;