Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
residFunc.h
Go to the documentation of this file.
1 #ifndef _RESIDFUNC_H_
2 #define _RESIDFUNC_H_
3 
4 using namespace CLHEP;
5 
6 class residFunc {
7  public:
8  virtual ~residFunc();
9  virtual void resid(const HepVector *x, void *data, HepVector *f) = 0;
10  virtual void deriv(const HepVector *x, void *data, HepMatrix *J) = 0;
11  virtual void residAndDeriv(const HepVector *x, void *data, HepVector *f, HepMatrix *J) = 0;
12  virtual unsigned int getN() = 0;
13  virtual unsigned int getP() = 0;
14  inline double getChiSquared(){return chiSquared;};
15  protected:
16  double chiSquared;
17 };
18 
19 extern "C" {
20 #include <gsl/gsl_vector.h>
21 #include <gsl/gsl_blas.h>
22 #include <gsl/gsl_multifit_nlin.h>
23 
24  int fGsl(const gsl_vector *x, void *data, gsl_vector *f);
25  int dfGsl(const gsl_vector *x, void *data, gsl_matrix *J);
26  int fdfGsl(const gsl_vector *x, void *data, gsl_vector *f, gsl_matrix *J);
27 }
28 
29 #endif // _RESIDFUNC_H_
Double_t x[NCHANNELS]
Definition: st_tw_resols.C:39
TF1 * f
Definition: FitGains.C:21
int fGsl(const gsl_vector *x, void *data, gsl_vector *f)
Definition: globalGslFuncs.h:6
int fdfGsl(const gsl_vector *x, void *data, gsl_vector *f, gsl_matrix *J)
double getChiSquared()
Definition: residFunc.h:14
int dfGsl(const gsl_vector *x, void *data, gsl_matrix *J)