Added pointer to residual variable to linreg cache
authorJason Stover <jhs@math.gcsu.edu>
Wed, 19 Apr 2006 01:20:33 +0000 (01:20 +0000)
committerJason Stover <jhs@math.gcsu.edu>
Wed, 19 Apr 2006 01:20:33 +0000 (01:20 +0000)
src/math/linreg/ChangeLog
src/math/linreg/linreg.c
src/math/linreg/linreg.h

index 7fecac64f8f86b1cd8fbfd9c707366391478d5a8..4743b08e2277eafbb4a931df51ace4f0698990d7 100644 (file)
@@ -1,3 +1,10 @@
+2006-04-18  Jason Stover  <jhs@math.gcsu.edu>
+
+       * 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  <jason@wonko.gcsu.edu>
 
        * linreg.c (pspp_linreg_cache_free): Accept a pointer of type
index ec1354f33ef44b68eaf08d841bb5bf3fe6aa70af..2945b26d87002f9983d1267d041ca5433ce6ac25 100644 (file)
@@ -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;
 }
index a3b0c780e24023e261d34542d8ac4f1f3d373576..dbdc23c02fb6efbb15cb47c2d0c78d2aed8f1c37 100644 (file)
@@ -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;