X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Flinreg%2Fsweep.c;h=000a5e3e0f740ed6b26957ccb2ee5703649db1e6;hb=45fb19608ffa759f7a0221878d1a9a72c6727dc7;hp=6e114266c7ac0f64b5d2d89729a3fb7f568555ce;hpb=9703148a4b6ae39bd7ff79741020dac46018a7f7;p=pspp-builds.git
diff --git a/lib/linreg/sweep.c b/lib/linreg/sweep.c
index 6e114266..000a5e3e 100644
--- a/lib/linreg/sweep.c
+++ b/lib/linreg/sweep.c
@@ -1,30 +1,25 @@
-/* lib/linreg/sweep.c
+/* PSPP - a program for statistical analysis.
+ Copyright (C) 2005, 2009 Free Software Foundation, Inc.
- Copyright (C) 2005 Free Software Foundation, Inc.
- Written by Jason H Stover.
+ 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
- 02111-1307, USA.
- */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see . */
/*
Find the least-squares estimate of b for the linear model:
Y = Xb + Z
- where Y is an n-by-1 column vector, X is an n-by-p matrix of
+ where Y is an n-by-1 column vector, X is an n-by-p matrix of
independent variables, b is a p-by-1 vector of regression coefficients,
and Z is an n-by-1 normally-distributed random vector with independent
identically distributed components with mean 0.
@@ -45,7 +40,9 @@
Springer. 1998. ISBN 0-387-98542-5.
*/
-#include "pspp_linreg.h"
+#include
+
+#include "sweep.h"
/*
The matrix A will be overwritten. In ordinary uses of the sweep
@@ -58,7 +55,7 @@
-- --
X refers to the design matrix and Y to the vector of dependent
- observations. pspp_reg_sweep sweeps on the diagonal elements of
+ observations. reg_sweep sweeps on the diagonal elements of
X'X.
The matrix A is assumed to be symmetric, so the sweep operation is
@@ -66,7 +63,7 @@
*/
int
-pspp_reg_sweep (gsl_matrix * A)
+reg_sweep (gsl_matrix * A)
{
double sweep_element;
double tmp;
@@ -95,7 +92,7 @@ pspp_reg_sweep (gsl_matrix * A)
for (j = i; j < A->size2; j++)
{
/*
- Use only the upper triangle of A.
+ Use only the upper triangle of A.
*/
if (j < k)
{