A generic class for \(\mathbb{R}^D\mapsto\mathbb{R}^N\) grid interpolation. More...
#include <include/CepGen/Utils/GridHandler.h>
Public Types | |
using | coord_t = std::vector<double> |
Coordinates container. | |
using | values_t = std::array<double, N> |
Value(s) at a given coordinate. | |
Public Member Functions | |
GridHandler (const GridType &grid_type) | |
Build a grid interpolator from a grid type. | |
virtual | ~GridHandler ()=default |
values_t | eval (const coord_t &in_coords) const |
Interpolate a point to a given coordinate. | |
void | insert (const coord_t &coord, values_t value) |
Insert a new value in the grid. | |
std::map< coord_t, values_t > | values () const |
List of values in the grid. | |
void | initialise () |
Initialise the grid and all useful interpolators/accelerators. | |
std::array< Limits, D > | boundaries () const |
Grid boundaries (collection of (min,max)) | |
std::array< double, D > | min () const |
Lowest bound of the grid coordinates. | |
std::array< double, D > | max () const |
Highest bound of the grid coordinates. | |
Protected Attributes | |
const GridType | grid_type_ |
Type of interpolation for the grid members. | |
std::map< coord_t, values_t > | values_raw_ |
List of coordinates and associated value(s) in the grid Grid interpolation accelerator. | |
std::vector< std::unique_ptr< gsl_interp_accel, void(*)(gsl_interp_accel *)> > | accelerators_ |
std::vector< std::unique_ptr< gsl_spline, void(*)(gsl_spline *)> > | splines_1d_ |
Splines for linear interpolations. | |
std::array< coord_t, D > | coordinates_ |
Coordinates building up the grid. | |
std::array< std::unique_ptr< double[]>, N > | values_ |
Values for all points in the grid. | |
D | Number of variables in the grid (dimension) |
N | Number of values handled per point |
Definition at line 43 of file GridHandler.h.
using coord_t = std::vector<double> |
Definition at line 48 of file GridHandler.h.
using values_t = std::array<double, N> |
Definition at line 49 of file GridHandler.h.
|
explicit |
|
virtualdefault |
std::array< Limits, D > boundaries | ( | ) | const |
void initialise | ( | ) |
std::array< double, D > max | ( | ) | const |
std::array< double, D > min | ( | ) | const |
Definition at line 54 of file GridHandler.h.
|
protected |
Definition at line 65 of file GridHandler.h.
|
protected |
Definition at line 71 of file GridHandler.h.
|
protected |
Definition at line 62 of file GridHandler.h.
|
protected |
Definition at line 66 of file GridHandler.h.
|
protected |
Definition at line 72 of file GridHandler.h.
Definition at line 63 of file GridHandler.h.