ARTS
2.2.66
|
Structure to store a grid position. More...
#include <interpolation.h>
Public Attributes | |
Index | idx |
Numeric | fd [2] |
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 half-way 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 74 of file interpolation.h.
Numeric GridPos::fd[2] |
Fractional distance to next point (0<=fd[0]<=1), fd[1] = 1-fd[0].
Definition at line 76 of file interpolation.h.
Referenced by fractional_gp(), gridpos(), gridpos2gridrange(), gridpos_check_fd(), gridpos_copy(), gridpos_force_end_fd(), gridpos_upperend_check(), interp_poly(), is_gridpos_at_index_i(), operator<<(), refell2d(), xml_read_from_stream(), and xml_write_to_stream().
Index GridPos::idx |
Original grid index below interpolation point.
Definition at line 75 of file interpolation.h.
Referenced by fractional_gp(), gridpos(), gridpos2gridrange(), gridpos_copy(), gridpos_force_end_fd(), gridpos_upperend_check(), interp(), interp_cloudfield_gp2itw(), interp_poly(), SLIData2::interpolate(), is_gridpos_at_index_i(), iy_interp_cloudbox_field(), iyInterpCloudboxField2(), mcPathTraceIPA(), operator<<(), refell2d(), xml_read_from_stream(), and xml_write_to_stream().