## File: 2D-Interpolation-Grids.html

package info (click to toggle)
gsl-ref-html 2.3-1
• area: non-free
• in suites: bullseye, sid
• size: 6,876 kB
• ctags: 4,574
• sloc: makefile: 35
 file content (107 lines) | stat: -rw-r--r-- 5,312 bytes parent folder | download
 `123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107` `````` GNU Scientific Library – Reference Manual: 2D Interpolation Grids

28.11 2D Interpolation Grids

The 2D interpolation routines access the function values z_{ij} with the following ordering:

z_ij = za[j*xsize + i]

with i = 0,...,xsize-1 and j = 0,...,ysize-1. However, for ease of use, the following functions are provided to add and retrieve elements from the function grid without requiring knowledge of the internal ordering.

Function: int gsl_interp2d_set (const gsl_interp2d * interp, double za[], const size_t i, const size_t j, const double z)

This function sets the value z_{ij} for grid point (i,j) of the array za to z.

Function: double gsl_interp2d_get (const gsl_interp2d * interp, const double za[], const size_t i, const size_t j)

This function returns the value z_{ij} for grid point (i,j) stored in the array za.

Function: size_t gsl_interp2d_idx (const gsl_interp2d * interp, const size_t i, const size_t j)

This function returns the index corresponding to the grid point (i,j). The index is given by j*xsize + i.

``````