1 /* multifit/gsl_multifit.h
3 * Copyright (C) 2000, 2007 Brian Gough
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __GSL_MULTIFIT_H__
21 #define __GSL_MULTIFIT_H__
24 #include <gsl/gsl_math.h>
25 #include <gsl/gsl_vector.h>
26 #include <gsl/gsl_matrix.h>
31 # define __BEGIN_DECLS extern "C" {
32 # define __END_DECLS }
34 # define __BEGIN_DECLS /* empty */
35 # define __END_DECLS /* empty */
42 size_t n; /* number of observations */
43 size_t p; /* number of parameters */
52 gsl_multifit_linear_workspace;
54 gsl_multifit_linear_workspace *
55 gsl_multifit_linear_alloc (size_t n, size_t p);
58 gsl_multifit_linear_free (gsl_multifit_linear_workspace * work);
61 gsl_multifit_linear (const gsl_matrix * X,
66 gsl_multifit_linear_workspace * work);
69 gsl_multifit_linear_svd (const gsl_matrix * X,
76 gsl_multifit_linear_workspace * work);
79 gsl_multifit_wlinear (const gsl_matrix * X,
85 gsl_multifit_linear_workspace * work);
88 gsl_multifit_wlinear_svd (const gsl_matrix * X,
96 gsl_multifit_linear_workspace * work);
99 gsl_multifit_linear_est (const gsl_vector * x,
100 const gsl_vector * c,
101 const gsl_matrix * cov, double *y, double *y_err);
104 gsl_multifit_linear_residuals (const gsl_matrix *X, const gsl_vector *y,
105 const gsl_vector *c, gsl_vector *r);
109 #endif /* __GSL_MULTIFIT_H__ */