X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fmath%2Finteraction.c;h=2f8da8ccaaa1fd4619a73415a8ff888cd097d9ac;hb=c1ecb26e96f0abc014a374081e7c2f985b2ca112;hp=be3d3edb576bad70a4b15d9c6a8a8b27fde5d0a6;hpb=5715e8846c6e3a8dd539b2dc9c9c65640f84af76;p=pspp
diff --git a/src/math/interaction.c b/src/math/interaction.c
index be3d3edb57..2f8da8ccaa 100644
--- a/src/math/interaction.c
+++ b/src/math/interaction.c
@@ -1,25 +1,21 @@
-/* PSPP - Creates data structures to store interactions for
- statistical routines.
+/* PSPP - a program for statistical analysis.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program. If not, see . */
/*
- An interaction is a gsl_vector containing a "product" of other
+ An interaction is a structure containing a "product" of other
variables. The variables can be either categorical or numeric.
If the variables are all numeric, the interaction is just the
scalar product. If any of the variables are categorical, their
@@ -28,76 +24,255 @@
OBS_VALS member. If there are K categorical variables, each with
N_1, N_2, ..., N_K categories, then the interaction will have
N_1 * N_2 * N_3 *...* N_K - 1 entries.
+
+ When using these functions, make sure the orders of variables and
+ values match when appropriate.
*/
+
+#include
#include
-#include
-#include
-#include
-#include
+#include
+#include
#include
+#include
+#include