yat
0.8.3pre
|
00001 #ifndef _theplu_yat_regression_gslinterpolation_ 00002 #define _theplu_yat_regression_gslinterpolation_ 00003 00004 // $Id: GSLInterpolation.h 2119 2009-12-12 23:11:43Z peter $ 00005 00006 /* 00007 Copyright (C) 2004, 2005, 2006, 2007, 2008 Jari Häkkinen, Peter Johansson 00008 Copyright (C) 2009 Jari Häkkinen 00009 00010 This file is part of the yat library, http://dev.thep.lu.se/yat 00011 00012 The yat library is free software; you can redistribute it and/or 00013 modify it under the terms of the GNU General Public License as 00014 published by the Free Software Foundation; either version 3 of the 00015 License, or (at your option) any later version. 00016 00017 The yat library is distributed in the hope that it will be useful, 00018 but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00020 General Public License for more details. 00021 00022 You should have received a copy of the GNU General Public License 00023 along with yat. If not, see <http://www.gnu.org/licenses/>. 00024 */ 00025 00026 #include <gsl/gsl_interp.h> 00027 00028 namespace theplu { 00029 namespace yat { 00030 namespace utility { 00031 class VectorBase; 00032 } 00033 namespace regression { 00034 00059 class GSLInterpolation 00060 { 00061 00062 public: 00076 GSLInterpolation(const gsl_interp_type*, const utility::VectorBase& x, 00077 const utility::VectorBase& y); 00078 00082 virtual ~GSLInterpolation(void)=0; 00083 00093 double evaluate(double x); 00094 00104 double evaluate_derivative(double x); 00105 00115 double evaluate_derivative2(double x); 00116 00126 double evaluate_integral(double a, double b); 00127 00134 double evaluation(void) const; 00135 00145 unsigned int min_size(void) const; 00146 00147 private: 00151 GSLInterpolation(const GSLInterpolation&); 00152 // no assignment 00153 GSLInterpolation& operator=(const GSLInterpolation&); 00154 00155 gsl_interp_accel* accelerator_; 00156 double evaluation_; 00157 gsl_interp* interpolator_; 00158 double* x_; 00159 double* y_; 00160 }; 00161 00162 }}} // of namespaces regression, yat, and theplu 00163 00164 #endif