KAME: C++ program for laboratory measurement
Main Page
Related Pages
Classes
Files
File List
kame
math
cspline.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
#ifndef CSPLINE_H_
15
#define CSPLINE_H_
16
17
#include "support.h"
18
19
#include <map>
20
#include <gsl/gsl_interp.h>
21
#include <gsl/gsl_spline.h>
22
23
//! Wrapper class for cubic (natural) spline approximation.
24
class
DECLSPEC_KAME
CSplineApprox
{
25
public
:
26
CSplineApprox
(
const
std::map<double, double> &pts);
27
~
CSplineApprox
();
28
//! Do spline approx.
29
double
approx(
double
x)
const
;
30
private
:
31
gsl_interp_accel *m_accel;
32
gsl_spline *m_spline;
33
};
34
35
#endif
/*CSPLINE_H_*/
Generated for
KAME4
by
1.8.3