ARTS 2.5.4 (git: 31ce4f0e)

Structure to store a grid position. More...
#include <interpolation.h>
Public Attributes  
Index  idx 
std::array< Numeric, 2 >  fd 
Friends  
ostream &  operator<< (ostream &os, const GridPos &gp) 
Output operator for GridPos. More...  
Structure to store a grid position.
A grid position specifies, where an interpolation point is, relative to the original grid. It consists of three parts, an Index giving the original grid index below the interpolation point, a Numeric giving the fractional distance to the next original grid point, and a Numeric giving 1 minus this number. Of course, the last element is redundant. However, it is efficient to store this, since it is used many times over. We store the two Numerics in a plain C array of dimension 2. (No need to use fancy Array or Vector for this, since the dimension is fixed.)
For example, idx=3 and fd=.5 means that this interpolation point is halfway between index 3 and 4 of the original grid.
Note, that below in the first paragraph means "with a lower index". If the original grid is sorted in descending order, the value at the grid point below the interpolation point will be numerically higher than the interpolation point.
In other words, grid positions and fractional distances are defined relative to the order of the original grid. Examples:
old grid = 2 3 new grid = 2.25 idx = 0 fd[0] = 0.25
old grid = 3 2 new grid = 2.25 idx = 0 fd[0] = 0.75
Note that fd[0] is different in the second case, because the old grid is sorted in descending order. Note also that idx is the same in both cases.
Grid positions for a whole new grid are stored in an Array<GridPos> (called ArrayOfGridPos).
Definition at line 73 of file interpolation.h.

friend 
Output operator for GridPos.
This is just intended for testing and debugging.
os  Output stream. 
gp  Grid position. 
Definition at line 96 of file interpolation.cc.
std::array<Numeric, 2> GridPos::fd 
Fractional distance to next point (0<=fd[0]<=1), fd[1] = 1fd[0].
Definition at line 75 of file interpolation.h.
Referenced by fractional_gp(), grid_index_from_gp(), gridpos(), gridpos2gridrange(), gridpos_check_fd(), gridpos_copy(), gridpos_force_end_fd(), gridpos_upperend_check(), interp_poly(), is_gridpos_at_index_i(), particle_bulkpropRadarOnionPeeling(), ppathPlaneParallel(), refell2d(), surface_typeInterpTypeMask(), xml_read_from_stream(), and xml_write_to_stream().
Index GridPos::idx 
Original grid index below interpolation point.
Definition at line 74 of file interpolation.h.
Referenced by fractional_gp(), grid_index_from_gp(), gridpos(), gridpos2gridrange(), gridpos_copy(), gridpos_force_end_fd(), gridpos_upperend_check(), interp(), interp_cloudfield_gp2itw(), interp_poly(), is_gridpos_at_index_i(), iyInterpCloudboxField(), particle_bulkpropRadarOnionPeeling(), pha_mat_sptFromMonoData(), ppathPlaneParallel(), refell2d(), surface_typeInterpTypeMask(), xml_read_from_stream(), and xml_write_to_stream().