Interpolation.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2008 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9#ifndef __Pulsar_Interpolation_h
10#define __Pulsar_Interpolation_h
11
12#include "Reference.h"
13
14#include <gsl/gsl_interp.h>
15#include <gsl/gsl_spline.h>
16
17#include <vector>
18
21{
22
23public:
24
27
29 virtual ~Interpolation ();
30
32 void init (const std::vector<double>& x, const std::vector<double>& y);
33
35 double eval (double x);
36
37protected:
38
39 const double* xa;
40 const double* ya;
41 size_t size;
42
43 gsl_interp* interp;
44 gsl_interp_accel* acc;
45
46 void destroy ();
47};
48
49#endif
double eval(double x)
Evaluate at the given abscissa.
Definition Interpolation.C:59
Interpolation()
Default constructor.
Definition Interpolation.C:14
virtual ~Interpolation()
Destructor.
Definition Interpolation.C:23
void init(const std::vector< double > &x, const std::vector< double > &y)
Initialize interpolation object.
Definition Interpolation.C:29
Manages Reference::To references to the instance.
Definition ReferenceAble.h:35

Generated using doxygen 1.14.0