yat  0.16.4pre
GSLInterpolation.h
1 #ifndef _theplu_yat_regression_gslinterpolation_
2 #define _theplu_yat_regression_gslinterpolation_
3 
4 // $Id: GSLInterpolation.h 2992 2013-03-03 05:03:44Z peter $
5 
6 /*
7  Copyright (C) 2004, 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2009 Jari Häkkinen
9 
10  This file is part of the yat library, http://dev.thep.lu.se/yat
11 
12  The yat library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU General Public License as
14  published by the Free Software Foundation; either version 3 of the
15  License, or (at your option) any later version.
16 
17  The yat library is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with yat. If not, see <http://www.gnu.org/licenses/>.
24 */
25 
26 #include <gsl/gsl_interp.h>
27 
28 namespace theplu {
29 namespace yat {
30 namespace utility {
31  class VectorBase;
32 }
33 namespace regression {
34 
60  {
61 
62  public:
76  GSLInterpolation(const gsl_interp_type*, const utility::VectorBase& x,
77  const utility::VectorBase& y);
78 
82  virtual ~GSLInterpolation(void)=0;
83 
93  double evaluate(double x);
94 
104  double evaluate_derivative(double x);
105 
115  double evaluate_derivative2(double x);
116 
126  double evaluate_integral(double a, double b);
127 
134  double evaluation(void) const;
135 
145  unsigned int min_size(void) const;
146 
147  private:
152  // no assignment
153  GSLInterpolation& operator=(const GSLInterpolation&);
154 
155  gsl_interp_accel* accelerator_;
156  double evaluation_;
157  gsl_interp* interpolator_;
158  double* x_;
159  double* y_;
160  };
161 
162 }}} // of namespaces regression, yat, and theplu
163 
164 #endif
The Department of Theoretical Physics namespace as we define it.
This is the yat interface to GSL vector.
Definition: VectorBase.h:55
Base class for interfacing GSL interpolation.
Definition: GSLInterpolation.h:59

Generated on Thu Dec 12 2019 03:12:08 for yat by  doxygen 1.8.11