QtiPlot 0.9.7.3

fit_gsl.h

Go to the documentation of this file.
00001 /***************************************************************************
00002    File                 : fit_gsl.h
00003    Project              : QtiPlot
00004    Description          : Built-in data fit models for QtiPlot
00005    --------------------------------------------------------------------
00006    Copyright            : (C) 2004-2010 Ion Vasilief (ion_vasilief*yahoo.fr)
00007                           (replace * with @ in the email address)
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *  This program is free software; you can redistribute it and/or modify   *
00013  *  it under the terms of the GNU General Public License as published by   *
00014  *  the Free Software Foundation; either version 2 of the License, or      *
00015  *  (at your option) any later version.                                    *
00016  *                                                                         *
00017  *  As a special exception, you may omit the above copyright notice when   *
00018  *  distributing modified copies of this file (for instance, when using it *
00019  *  as a template for your own fit plugin).                                *
00020  *                                                                         *
00021  *  This program is distributed in the hope that it will be useful,        *
00022  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
00023  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
00024  *  GNU General Public License for more details.                           *
00025  *                                                                         *
00026  *   You should have received a copy of the GNU General Public License     *
00027  *   along with this program; if not, write to the Free Software           *
00028  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
00029  *   Boston, MA  02110-1301  USA                                           *
00030  *                                                                         *
00031  ***************************************************************************/
00032 
00033 #ifndef FIT_GSL_H
00034 #define FIT_GSL_H
00035 
00036 #include <gsl/gsl_vector.h>
00037 #include <gsl/gsl_matrix.h>
00038 
00039 class Fit;
00040     
00042 struct FitData {
00043   int n;// number of points to be fitted (size of X, Y and sigma arrays)
00044   int p;// number of fit parameters
00045   double * X;// the data to be fitted (abscissae) 
00046   double * Y; // the data to be fitted (ordinates)
00047   double * sigma; // the weighting data
00048   Fit *fitter; //pointer to the fitter object (used only for the NonLinearFit class)
00049 };
00050 
00051 int expd3_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00052 int expd3_df (const gsl_vector * x, void *params, gsl_matrix * J);
00053 int expd3_f (const gsl_vector * x, void *params, gsl_vector * f);
00054 double expd3_d (const gsl_vector * x, void *params);
00055 
00056 int expd2_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00057 int expd2_df (const gsl_vector * x, void *params, gsl_matrix * J);
00058 int expd2_f (const gsl_vector * x, void *params, gsl_vector * f);
00059 double expd2_d (const gsl_vector * x, void *params);
00060 
00061 int exp_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00062 int exp_df (const gsl_vector * x, void *params, gsl_matrix * J);
00063 int exp_f (const gsl_vector * x, void *params, gsl_vector * f);
00064 double exp_d (const gsl_vector * x, void *params);
00065 
00066 int boltzmann_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00067 int boltzmann_df (const gsl_vector * x, void *params, gsl_matrix * J);
00068 int boltzmann_f (const gsl_vector * x, void *params, gsl_vector * f);
00069 double boltzmann_d (const gsl_vector * x, void *params);
00070 
00071 int logistic_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00072 int logistic_df (const gsl_vector * x, void *params, gsl_matrix * J);
00073 int logistic_f (const gsl_vector * x, void *params, gsl_vector * f);
00074 double logistic_d (const gsl_vector * x, void *params);
00075 
00076 int gauss_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00077 int gauss_df (const gsl_vector * x, void *params, gsl_matrix * J);
00078 int gauss_f (const gsl_vector * x, void *params,gsl_vector * f);
00079 double gauss_d (const gsl_vector * x, void *params);
00080 
00081 int gauss_multi_peak_f (const gsl_vector * x, void *params, gsl_vector * f);
00082 double gauss_multi_peak_d (const gsl_vector * x, void *params);
00083 int gauss_multi_peak_df (const gsl_vector * x, void *params, gsl_matrix * J);
00084 int gauss_multi_peak_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00085 
00086 int lorentz_multi_peak_f (const gsl_vector * x, void *params, gsl_vector * f);
00087 double lorentz_multi_peak_d (const gsl_vector * x, void *params);
00088 int lorentz_multi_peak_df (const gsl_vector * x, void *params, gsl_matrix * J);
00089 int lorentz_multi_peak_fdf (const gsl_vector * x, void *params, gsl_vector * f, gsl_matrix * J);
00090 
00091 int user_f(const gsl_vector * x, void *params, gsl_vector * f);
00092 double user_d(const gsl_vector * x, void *params);
00093 int user_df(const gsl_vector * x, void *params,gsl_matrix * J);
00094 int user_fdf(const gsl_vector * x, void *params,gsl_vector * f, gsl_matrix * J);
00095 
00096 #endif