Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:03:47

0001 /* fit/gsl_fit.h
0002  * 
0003  * Copyright (C) 2000, 2007 Brian Gough
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef __GSL_FIT_H__
0021 #define __GSL_FIT_H__
0022 
0023 #include <stdlib.h>
0024 #include <gsl/gsl_math.h>
0025 
0026 #undef __BEGIN_DECLS
0027 #undef __END_DECLS
0028 #ifdef __cplusplus
0029 # define __BEGIN_DECLS extern "C" {
0030 # define __END_DECLS }
0031 #else
0032 # define __BEGIN_DECLS /* empty */
0033 # define __END_DECLS /* empty */
0034 #endif
0035 
0036 __BEGIN_DECLS
0037 
0038 int gsl_fit_linear (const double * x, const size_t xstride,
0039                     const double * y, const size_t ystride,
0040                     const size_t n,
0041                     double * c0, double * c1, 
0042                     double * cov00, double * cov01, double * cov11, 
0043                     double * sumsq);
0044 
0045 
0046 int gsl_fit_wlinear (const double * x, const size_t xstride,
0047                      const double * w, const size_t wstride,
0048                      const double * y, const size_t ystride,
0049                      const size_t n,
0050                      double * c0, double * c1, 
0051                      double * cov00, double * cov01, double * cov11, 
0052                      double * chisq);
0053 
0054 int
0055 gsl_fit_linear_est (const double x, 
0056                     const double c0, const double c1, 
0057                     const double cov00, const double cov01, const double cov11,
0058                     double *y, double *y_err);
0059 
0060 
0061 int gsl_fit_mul (const double * x, const size_t xstride,
0062                  const double * y, const size_t ystride,
0063                  const size_t n,
0064                  double * c1, 
0065                  double * cov11, 
0066                  double * sumsq);
0067 
0068 int gsl_fit_wmul (const double * x, const size_t xstride,
0069                   const double * w, const size_t wstride,
0070                   const double * y, const size_t ystride,
0071                   const size_t n,
0072                   double * c1, 
0073                   double * cov11, 
0074                   double * sumsq);
0075 
0076 
0077 int
0078 gsl_fit_mul_est (const double x, 
0079                  const double c1, 
0080                  const double cov11,
0081                  double *y, double *y_err);
0082 
0083 __END_DECLS
0084 
0085 #endif /* __GSL_FIT_H__ */