Version: SMASH-3.1
interpolation2D.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2020,2022
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_INTERPOLATION2D_H_
11 #define SRC_INCLUDE_SMASH_INTERPOLATION2D_H_
12 
13 #include <vector>
14 
15 #include "gsl/gsl_spline2d.h"
16 
17 namespace smash {
18 
21  public:
34  InterpolateData2DSpline(const std::vector<double>& x,
35  const std::vector<double>& y,
36  const std::vector<double>& z);
37 
40 
48  double operator()(double xi, double yi) const;
49 
50  private:
52  double first_x_;
54  double last_x_;
56  double first_y_;
58  double last_y_;
59 
61  gsl_interp_accel* xacc_;
63  gsl_interp_accel* yacc_;
65  gsl_spline2d* spline_;
66 };
67 
68 } // namespace smash
69 
70 #endif // SRC_INCLUDE_SMASH_INTERPOLATION2D_H_
Represent a bicubic spline interpolation.
double first_y_
First y value.
InterpolateData2DSpline(const std::vector< double > &x, const std::vector< double > &y, const std::vector< double > &z)
Interpolate function f given discrete samples f(x_i, y_i) = z_i.
double operator()(double xi, double yi) const
Calculate bicubic interpolation for given x and y.
gsl_interp_accel * xacc_
GSL iterator for interpolation lookups in x direction.
gsl_spline2d * spline_
GSL spline in 2D.
double first_x_
First x value.
gsl_interp_accel * yacc_
GSL iterator for interpolation lookupin y direction.
Definition: action.h:24