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
RevLine 
[1643]1#ifndef _theplu_yat_regression_gslinterpolation_
2#define _theplu_yat_regression_gslinterpolation_
[193]3
[616]4// $Id: GSLInterpolation.h 1643 2008-12-13 00:23:39Z jari $
5
[675]6/*
[1643]7  Copyright (C) 2008 Jari Häkkinen
[193]8
[1437]9  This file is part of the yat library, http://dev.thep.lu.se/yat
[675]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
[1486]13  published by the Free Software Foundation; either version 3 of the
[675]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
[1487]22  along with yat. If not, see <http://www.gnu.org/licenses/>.
[675]23*/
24
[1643]25#include <gsl/gsl_interp.h>
[675]26
[193]27namespace theplu {
[680]28namespace yat {
[1643]29namespace utility {
30  class VectorConstView;
31}
[383]32namespace regression {
33
[713]34  /**
[1643]35     @brief Documentation please.
[713]36  */
[1643]37  class GSLInterpolation
38  {
[193]39
[1643]40  public:
[216]41
[713]42    /**
[1643]43       @brief Documentation please.
[713]44    */
[1643]45    double evaluate(const double x) const;
[193]46
[1643]47  protected:
[713]48    /**
[1643]49       @brief The default constructor
[713]50    */
[1643]51    GSLInterpolation(const gsl_interp_type*, const utility::VectorConstView& x,
52                     const utility::VectorConstView& y);
[207]53
[713]54    /**
[1643]55       @brief The destructor
[713]56    */
[1643]57    virtual ~GSLInterpolation(void);
[718]58
[1643]59  private:
[713]60    /**
[1643]61       Copy Constructor. (not implemented)
[713]62    */
[1643]63    GSLInterpolation(const GSLInterpolation&);
[213]64
[1643]65    gsl_interp_accel* accelerator_;
66    gsl_interp* interpolator_;
67    double* x_;
68    double* y_;
[193]69  };
70
[681]71}}} // of namespaces regression, yat, and theplu
[193]72
73#endif
Note: See TracBrowser for help on using the repository browser.