[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src language/stats/ChangeLog language/stat...
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp/src language/stats/ChangeLog language/stat... |
Date: |
Thu, 07 Dec 2006 05:16:33 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Changes by: Ben Pfaff <blp> 06/12/07 05:16:33
Modified files:
src/language/stats: ChangeLog regression.q
src/math : ChangeLog coefficient.c design-matrix.c
src/math/linreg: ChangeLog linreg.c
Log message:
Compare variable pointers instead of variable indexes.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/ChangeLog?cvsroot=pspp&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/pspp/src/language/stats/regression.q?cvsroot=pspp&r1=1.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/ChangeLog?cvsroot=pspp&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/coefficient.c?cvsroot=pspp&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/design-matrix.c?cvsroot=pspp&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/linreg/ChangeLog?cvsroot=pspp&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/pspp/src/math/linreg/linreg.c?cvsroot=pspp&r1=1.15&r2=1.16
Patches:
Index: language/stats/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/ChangeLog,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- language/stats/ChangeLog 5 Dec 2006 15:10:21 -0000 1.32
+++ language/stats/ChangeLog 7 Dec 2006 05:16:33 -0000 1.33
@@ -1,3 +1,8 @@
+Wed Dec 6 21:14:26 2006 Ben Pfaff <address@hidden>
+
+ * regression.q (reg_inserted): Compare variable pointers instead
+ of variable indexes.
+
Mon Dec 4 22:33:46 2006 Ben Pfaff <address@hidden>
* crosstabs.q (insert_summary): Use var_to_string for labeling.
Index: language/stats/regression.q
===================================================================
RCS file: /cvsroot/pspp/pspp/src/language/stats/regression.q,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- language/stats/regression.q 5 Dec 2006 15:10:21 -0000 1.39
+++ language/stats/regression.q 7 Dec 2006 05:16:33 -0000 1.40
@@ -722,7 +722,7 @@
for (i = 0; i < n_vars; i++)
{
- if (v->index == varlist[i]->index)
+ if (v == varlist[i])
{
return 1;
}
Index: math/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/ChangeLog,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- math/ChangeLog 5 Nov 2006 00:35:44 -0000 1.10
+++ math/ChangeLog 7 Dec 2006 05:16:33 -0000 1.11
@@ -1,3 +1,15 @@
+Wed Dec 6 21:14:59 2006 Ben Pfaff <address@hidden>
+
+ * coefficient.c: (pspp_coeff_get_value) Compare variable pointers
+ instead of variable indexes.
+ (pspp_linreg_get_coeff) Ditto.
+ (design_matrix_col_to_var_index) Removed.
+ (design_matrix_col_to_var) Compare variable pointers
+ instead of variable indexes.
+ (cmp_dm_var_index) Ditto.
+ (design_matrix_var_to_column) Ditto.
+ (dm_var_to_last_column) Ditto.
+
Sun Nov 5 08:30:32 WST 2006 John Darrington <address@hidden>
* levene.c levene.h Changed to use the new casefilter structure.
Index: math/coefficient.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/coefficient.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- math/coefficient.c 5 Dec 2006 15:10:21 -0000 1.5
+++ math/coefficient.c 7 Dec 2006 05:16:33 -0000 1.6
@@ -169,7 +169,7 @@
while (i < c->n_vars)
{
candidate = pspp_coeff_get_var (c, i);
- if (v->index == candidate->index)
+ if (v == candidate)
{
return (c->v_info + i)->val;
}
@@ -201,7 +201,7 @@
result = c->coeff[i];
tmp = pspp_coeff_get_var (result, 0);
- while (tmp->index != v->index && i < c->n_coeffs)
+ while (tmp != v && i < c->n_coeffs)
{
result = c->coeff[i];
tmp = pspp_coeff_get_var (result, 0);
@@ -221,7 +221,7 @@
If v is categorical, we need to ensure the coefficient
matches the VAL.
*/
- while (tmp->index != v->index && i < c->n_coeffs
+ while (tmp != v && i < c->n_coeffs
&& compare_values (pspp_coeff_get_value (result, tmp),
val, var_get_width (v)))
{ /* FIX THIS */
Index: math/design-matrix.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/design-matrix.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- math/design-matrix.c 5 Dec 2006 15:10:21 -0000 1.4
+++ math/design-matrix.c 7 Dec 2006 05:16:33 -0000 1.5
@@ -146,8 +146,8 @@
Return the index of the variable for the
given column.
*/
-static size_t
-design_matrix_col_to_var_index (const struct design_matrix *dm, size_t col)
+struct variable *
+design_matrix_col_to_var (const struct design_matrix *dm, size_t col)
{
size_t i;
struct design_matrix_var v;
@@ -156,42 +156,11 @@
{
v = dm->vars[i];
if (v.first_column <= col && col <= v.last_column)
- return (v.v)->index;
- }
- return DM_INDEX_NOT_FOUND;
-}
-
-/*
- Return a pointer to the variable whose values
- are stored in column col.
- */
-struct variable *
-design_matrix_col_to_var (const struct design_matrix *dm, size_t col)
-{
- size_t index;
- size_t i;
- struct design_matrix_var dmv;
-
- index = design_matrix_col_to_var_index (dm, col);
- for (i = 0; i < dm->n_vars; i++)
- {
- dmv = dm->vars[i];
- if ((dmv.v)->index == index)
- {
- return (struct variable *) dmv.v;
- }
+ return (struct variable *) v.v;
}
return NULL;
}
-static size_t
-cmp_dm_var_index (const struct design_matrix_var *dmv, size_t index)
-{
- if (dmv->v->index == index)
- return 1;
- return 0;
-}
-
/*
Return the number of the first column which holds the
values for variable v.
@@ -206,7 +175,7 @@
for (i = 0; i < dm->n_vars; i++)
{
tmp = dm->vars[i];
- if (cmp_dm_var_index (&tmp, v->index))
+ if (tmp.v == v)
{
return tmp.first_column;
}
@@ -225,7 +194,7 @@
for (i = 0; i < dm->n_vars; i++)
{
tmp = dm->vars[i];
- if (cmp_dm_var_index (&tmp, v->index))
+ if (tmp.v == v)
{
return tmp.last_column;
}
Index: math/linreg/ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/linreg/ChangeLog,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- math/linreg/ChangeLog 19 May 2006 20:05:59 -0000 1.14
+++ math/linreg/ChangeLog 7 Dec 2006 05:16:33 -0000 1.15
@@ -1,3 +1,8 @@
+Wed Dec 6 21:16:22 2006 Ben Pfaff <address@hidden>
+
+ * linreg.c: (pspp_linreg_get_vars) Compare variable pointers
+ instead of variable indexes.
+
2006-05-19 Jason Stover <address@hidden>
* coefficient.c: Moved to src/math.
Index: math/linreg/linreg.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/math/linreg/linreg.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- math/linreg/linreg.c 19 May 2006 21:08:20 -0000 1.15
+++ math/linreg/linreg.c 7 Dec 2006 05:16:33 -0000 1.16
@@ -123,7 +123,7 @@
/* 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--;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src language/stats/ChangeLog language/stat...,
Ben Pfaff <=