X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fmath%2Fdesign-matrix.h;h=ad2b82585229c3d9c52d119865f7dfe76e2d9bd3;hb=74cfe5c070a0810cf43c0981daa53dcea3a8ee3d;hp=ce17e5963cedd928a8ce581fb64d7d8e6a787229;hpb=ece16c8d0b27fc6c970f6d491b9a3e8a958fde82;p=pspp-builds.git
diff --git a/src/math/design-matrix.h b/src/math/design-matrix.h
index ce17e596..ad2b8258 100644
--- a/src/math/design-matrix.h
+++ b/src/math/design-matrix.h
@@ -1,20 +1,18 @@
-/* PSPP - Creates design matrices.
+/* PSPP - a program for statistical analysis.
Copyright (C) 2005 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 2 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 3 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 . */
/*
Create design matrices for procedures that need them.
@@ -26,7 +24,7 @@
#include
#include
#include
-#include
+
struct design_matrix_var
{
size_t first_column; /* First column for this variable in
@@ -40,6 +38,7 @@ struct design_matrix_var
size_t last_column;
const struct variable *v;
};
+
struct design_matrix
{
gsl_matrix *m;
@@ -61,7 +60,7 @@ struct design_matrix
*/
size_t n_vars;
};
-union value *cat_vector_to_value (const gsl_vector *, struct variable *);
+
struct design_matrix *design_matrix_create (int, const struct variable *[],
const size_t);
@@ -73,12 +72,13 @@ void design_matrix_set_categorical (struct design_matrix *, size_t,
const union value *);
void design_matrix_set_numeric (struct design_matrix *, size_t,
- const struct variable *, const union value *);
+ const struct variable *,
+ const union value *);
size_t design_matrix_var_to_column (const struct design_matrix *,
const struct variable *);
-struct variable *design_matrix_col_to_var (const struct design_matrix *,
+const struct variable *design_matrix_col_to_var (const struct design_matrix *,
size_t);
#endif