Documentation
|
|
C++ interface for Interpolation. More...
| array | approx1 (const array &Y, const array &Xi, char method='L', float offgrid=af::NaN) |
| Interpolation in one dimension (1D). More... | |
| array | approx2 (const array &Z, const array &Xi, const array &Yi, char method='L', float offgrid=af::NaN) |
Interpolation in two dimensions (2D): z=f(x,y) More... | |
C++ interface for Interpolation.
approx1 and approx2 perform interpolation on data in one and two dimensions, respectively. These methods have three options for the type of interpolation to perform—nearest neighbor, linear interpolation, and cubic interpolation.
1D Example:
2D Example:
| array af::approx1 | ( | const array & | Y, |
| const array & | Xi, | ||
| char | method = 'L', |
||
| float | offgrid = af::NaN |
||
| ) |
Interpolation in one dimension (1D).
| [in] | Y | Function values (range) |
| [in] | Xi | Domain positions at which to interpolate Y |
| [in] | method | interpolation type ('N' nearest, 'L' linear, 'C' cubic) |
| [in] | offgrid | value assumed when interpolating outside domain (default: af::NaN) |
Xi with values interpolated from Y | array af::approx2 | ( | const array & | Z, |
| const array & | Xi, | ||
| const array & | Yi, | ||
| char | method = 'L', |
||
| float | offgrid = af::NaN |
||
| ) |
Interpolation in two dimensions (2D): z=f(x,y)
| [in] | Z | function values (domain: (0:nx-1,0:ny-1) |
| [in] | Xi | X domain positions at which to interpolate Z |
| [in] | Yi | Y domain positions at which to interpolate Z |
| [in] | method | interpolation type ('N' nearest, 'L' linear, 'C' cubic) |
| [in] | offgrid | value assumed when interpolating outside domain (default: af::NaN) |
Xi and Yi with values interpolated from Z