#include <interpolation2D.h>
Represent a bicubic spline interpolation.
Definition at line 20 of file interpolation2D.h.
Public Member Functions | |
| 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. More... | |
| ~InterpolateData2DSpline () | |
| Destructor. More... | |
| double | operator() (double xi, double yi) const |
| Calculate bicubic interpolation for given x and y. More... | |
Private Attributes | |
| double | first_x_ |
| First x value. More... | |
| double | last_x_ |
| Last x value. More... | |
| double | first_y_ |
| First y value. More... | |
| double | last_y_ |
| Last y value. More... | |
| gsl_interp_accel * | xacc_ |
| GSL iterator for interpolation lookups in x direction. More... | |
| gsl_interp_accel * | yacc_ |
| GSL iterator for interpolation lookupin y direction. More... | |
| gsl_spline2d * | spline_ |
| GSL spline in 2D. More... | |
| smash::InterpolateData2DSpline::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.
| x | x-values. |
| y | y-values. |
| z | z-values |
A bicubic spline interpolation is used. Values outside the given samples will use the outmost sample as a constant extrapolation.
Definition at line 16 of file interpolation2D.cc.
| smash::InterpolateData2DSpline::~InterpolateData2DSpline | ( | ) |
Destructor.
Definition at line 54 of file interpolation2D.cc.
| double smash::InterpolateData2DSpline::operator() | ( | double | xi, |
| double | yi | ||
| ) | const |
Calculate bicubic interpolation for given x and y.
| xi | Interpolation argument in first dimension. |
| yi | Interpolation argument in second dimension. |
Definition at line 60 of file interpolation2D.cc.
|
private |
First x value.
Definition at line 52 of file interpolation2D.h.
|
private |
Last x value.
Definition at line 54 of file interpolation2D.h.
|
private |
First y value.
Definition at line 56 of file interpolation2D.h.
|
private |
Last y value.
Definition at line 58 of file interpolation2D.h.
|
private |
GSL iterator for interpolation lookups in x direction.
Definition at line 61 of file interpolation2D.h.
|
private |
GSL iterator for interpolation lookupin y direction.
Definition at line 63 of file interpolation2D.h.
|
private |
GSL spline in 2D.
Definition at line 65 of file interpolation2D.h.