source: trunk/yat/regression/GSLInterpolation.h @ 1643

Last change on this file since 1643 was 1643, checked in by Jari Häkkinen, 13 years ago

Addresses #466 and #425. Added cubic spline interpolation (not complete interface to GSL interpolation stuff).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1#ifndef _theplu_yat_regression_gslinterpolation_
2#define _theplu_yat_regression_gslinterpolation_
3
4// $Id: GSLInterpolation.h 1643 2008-12-13 00:23:39Z jari $
5
6/*
7  Copyright (C) 2008 Jari Häkkinen
8
9  This file is part of the yat library, http://dev.thep.lu.se/yat
10
11  The yat library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU General Public License as
13  published by the Free Software Foundation; either version 3 of the
14  License, or (at your option) any later version.
15
16  The yat library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20
21  You should have received a copy of the GNU General Public License
22  along with yat. If not, see <http://www.gnu.org/licenses/>.
23*/
24
25#include <gsl/gsl_interp.h>
26
27namespace theplu {
28namespace yat {
29namespace utility {
30  class VectorConstView;
31}
32namespace regression {
33
34  /**
35     @brief Documentation please.
36  */
37  class GSLInterpolation
38  {
39
40  public:
41
42    /**
43       @brief Documentation please.
44    */
45    double evaluate(const double x) const;
46
47  protected:
48    /**
49       @brief The default constructor
50    */
51    GSLInterpolation(const gsl_interp_type*, const utility::VectorConstView& x,
52                     const utility::VectorConstView& y);
53
54    /**
55       @brief The destructor
56    */
57    virtual ~GSLInterpolation(void);
58
59  private:
60    /**
61       Copy Constructor. (not implemented)
62    */
63    GSLInterpolation(const GSLInterpolation&);
64
65    gsl_interp_accel* accelerator_;
66    gsl_interp* interpolator_;
67    double* x_;
68    double* y_;
69  };
70
71}}} // of namespaces regression, yat, and theplu
72
73#endif
Note: See TracBrowser for help on using the repository browser.