nmrrelaxfit.h
1 /***************************************************************************
2  Copyright (C) 2002-2015 Kentaro Kitagawa
3  kitagawa@phys.s.u-tokyo.ac.jp
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  You should have received a copy of the GNU Library General
11  Public License and a list of authors along with this program;
12  see the files COPYING and AUTHORS.
13 ***************************************************************************/
14 //---------------------------------------------------------------------------
15 
16 #ifndef nmrrelaxfitH
17 #define nmrrelaxfitH
18 
19 #include "xlistnode.h"
20 
21 #include <gsl/gsl_vector.h>
22 #include <gsl/gsl_matrix.h>
23 
24 class XRelaxFunc : public XNode {
25 public:
26  XRelaxFunc(const char *name, bool runtime) : XNode(name, runtime) {}
27  virtual ~XRelaxFunc() {}
28  //! called during fitting
29  //! \param f f(t, it1) will be passed
30  //! \param dfdt df/d(it1) will be passed
31  //! \param t a time P1 or 2tau
32  //! \param data a relaxation function
33  //! \param it1 1/T1 or 1/T2
34  virtual void relax(double *f, double *dfdt, double t, double it1) = 0;
35 
36  static int relax_f (const gsl_vector * x, void *params,
37  gsl_vector * f);
38  static int relax_df (const gsl_vector * x, void *params,
39  gsl_matrix * J);
40  static int relax_fdf (const gsl_vector * x, void *params,
41  gsl_vector * f, gsl_matrix * J);
42 };
43 
44 class XRelaxFuncList : public XAliasListNode<XRelaxFunc> {
45 public:
46  XRelaxFuncList(const char *name, bool runtime);
47  virtual ~XRelaxFuncList() {}
48 };
49 
50 
51 //---------------------------------------------------------------------------
52 #endif

Generated for KAME4 by  doxygen 1.8.3