A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.arrayfire.org/docs/group__signal__func__approx2.htm below:

ArrayFire: approx2

Interpolation along two dimensions. More...

AFAPI array  approx2 (const array &in, const array &pos0, const array &pos1, const interpType method=AF_INTERP_LINEAR, const float off_grid=0.0f)   C++ Interface for data interpolation on two-dimensional signals. More...
  AFAPI array  approx2 (const array &in, const array &pos0, const int interp_dim0, const double idx_start_dim0, const double idx_step_dim0, const array &pos1, const int interp_dim1, const double idx_start_dim1, const double idx_step_dim1, const interpType method=AF_INTERP_LINEAR, const float off_grid=0.0f)   C++ Interface for data interpolation on two-dimensional signals. More...
  AFAPI af_err  af_approx2 (af_array *out, const af_array in, const af_array pos0, const af_array pos1, const af_interp_type method, const float off_grid)   C Interface for signals interpolation on two dimensional signals. More...
  AFAPI af_err  af_approx2_v2 (af_array *out, const af_array in, const af_array pos0, const af_array pos1, const af_interp_type method, const float off_grid)   C Interface for the version of af_approx2 that accepts a preallocated output array. More...
  AFAPI af_err  af_approx2_uniform (af_array *out, const af_array in, const af_array pos0, const int interp_dim0, const double idx_start_dim0, const double idx_step_dim0, const af_array pos1, const int interp_dim1, const double idx_start_dim1, const double idx_step_dim1, const af_interp_type method, const float off_grid)   C Interface for signals interpolation on two dimensional signals along specified dimensions. More...
  AFAPI af_err  af_approx2_uniform_v2 (af_array *out, const af_array in, const af_array pos0, const int interp_dim0, const double idx_start_dim0, const double idx_step_dim0, const af_array pos1, const int interp_dim1, const double idx_start_dim1, const double idx_step_dim1, const af_interp_type method, const float off_grid)   C Interface for the version of af_approx2_uniform that accepts a preallocated output array. More...
 

Interpolation along two dimensions.

Performs interpolation on data along two dimensions.

Interpolation is the process of computing for unknown values within a continuous range described by a discrete set of known values. These known values correspond to a uniformly-spaced range of indices determined by start and step values, whose defaults are 0.0 and 1.0, respectively.

The positions arrays (pos0 and pos1) contain the interpolating points (indices whose values we want to find) along two given dimensions. Values of known indices will be looked up in the input array, while values of unknown indices will be found via interpolation. Indices outside of the index range are not extrapolated. Instead, those values are set to off_grid, whose default value is 0.0.

All of the interpolation methods defined in af_interp_type are supported by approx2. Unless specified, linear interpolation is performed by default.

◆ af_approx2()

C Interface for signals interpolation on two dimensional signals.

Parameters
[out] out the interpolated array. [in] in is the multidimensional input array. Values assumed to lie uniformly spaced indices in the range of [0, n) along both interpolation dimensions. n is the number of elements in the array. [in] pos0 positions of the interpolation points along the first dimension. [in] pos1 positions of the interpolation points along the second dimension. [in] method is the interpolation method to be used. All interpolation types defined in af_interp_type are supported. [in] off_grid is the default value for any indices outside the valid range of indices.
Returns
AF_SUCCESS if the interpolation operation is successful, otherwise an appropriate error code is returned.
◆ af_approx2_uniform() AFAPI af_err af_approx2_uniform ( af_arrayout, const af_array  in, const af_array  pos0, const int  interp_dim0, const double  idx_start_dim0, const double  idx_step_dim0, const af_array  pos1, const int  interp_dim1, const double  idx_start_dim1, const double  idx_step_dim1, const af_interp_type  method, const float  off_grid  )

C Interface for signals interpolation on two dimensional signals along specified dimensions.

af_approx2_uniform() accepts two dimensions to perform the interpolation along the input. It also accepts start and step values which define the uniform range of corresponding indices.

Parameters
[out] out the interpolated array. [in] in is the multidimensional input array. [in] pos0 positions of the interpolation points along interp_dim0. [in] interp_dim0 is the first dimension to perform interpolation across. [in] idx_start_dim0 is the first index value along interp_dim0. [in] idx_step_dim0 is the uniform spacing value between subsequent indices along interp_dim0. [in] pos1 positions of the interpolation points along interp_dim1. [in] interp_dim1 is the second dimension to perform interpolation across. [in] idx_start_dim1 is the first index value along interp_dim1. [in] idx_step_dim1 is the uniform spacing value between subsequent indices along interp_dim1. [in] method is the interpolation method to be used. All interpolation types defined in af_interp_type are supported. [in] off_grid is the default value for any indices outside the valid range of indices.
Returns
AF_SUCCESS if the interpolation operation is successful, otherwise an appropriate error code is returned.
◆ af_approx2_uniform_v2() AFAPI af_err af_approx2_uniform_v2 ( af_arrayout, const af_array  in, const af_array  pos0, const int  interp_dim0, const double  idx_start_dim0, const double  idx_step_dim0, const af_array  pos1, const int  interp_dim1, const double  idx_start_dim1, const double  idx_step_dim1, const af_interp_type  method, const float  off_grid  )

C Interface for the version of af_approx2_uniform that accepts a preallocated output array.

Parameters
[in,out] out the interpolated array. [in] in is the multidimensional input array. [in] pos0 positions of the interpolation points along interp_dim0. [in] interp_dim0 is the first dimension to perform interpolation across. [in] idx_start_dim0 is the first index value along interp_dim0. [in] idx_step_dim0 is the uniform spacing value between subsequent indices along interp_dim0. [in] pos1 positions of the interpolation points along interp_dim1. [in] interp_dim1 is the second dimension to perform interpolation across. [in] idx_start_dim1 is the first index value along interp_dim1. [in] idx_step_dim1 is the uniform spacing value between subsequent indices along interp_dim1. [in] method is the interpolation method to be used. All interpolation types defined in af_interp_type are supported. [in] off_grid is the default value for any indices outside the valid range of indices.
Returns
AF_SUCCESS if the interpolation operation is successful, otherwise an appropriate error code is returned.
Note
out can either be a null or existing af_array object. If it is a sub-array of an existing af_array, only the corresponding portion of the af_array will be overwritten
Passing an af_array to out that has not been initialized will cause undefined behavior.
◆ af_approx2_v2()

C Interface for the version of af_approx2 that accepts a preallocated output array.

Parameters
[in,out] out the interpolated array (can be preallocated). [in] in is the multidimensional input array. Values assumed to lie uniformly spaced indices in the range of [0, n) along both interpolation dimensions. n is the number of elements in the array. [in] pos0 positions of the interpolation points along the first dimension. [in] pos1 positions of the interpolation points along the second dimension. [in] method is the interpolation method to be used. All interpolation types defined in af_interp_type are supported. [in] off_grid is the default value for any indices outside the valid range of indices.
Returns
AF_SUCCESS if the interpolation operation is successful, otherwise an appropriate error code is returned.
Note
out can either be a null or existing af_array object. If it is a sub-array of an existing af_array, only the corresponding portion of the af_array will be overwritten
Passing an af_array to out that has not been initialized will cause undefined behavior.
◆ approx2() [1/2]

C++ Interface for data interpolation on two-dimensional signals.

Parameters
[in] in is the multidimensional input array. Values assumed to lie uniformly spaced indices in the range of [0, n) along both interpolation dimensions. n is the number of elements in the array. [in] pos0 positions of the interpolation points along the first dimension. [in] pos1 positions of the interpolation points along the second dimension. [in] method is the interpolation method to be used. All interpolation types defined in af_interp_type are supported. [in] off_grid is the default value for any indices outside the valid range of indices.
Returns
the interpolated array.

The code sample below demonstrates approx2()'s usage:

float input_vals[9] = {1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0};

array input(3, 3, input_vals);

float pv0[4] = {0.5, 1.5, 0.5, 1.5};

array pos0(2, 2, pv0);

float pv1[4] = {0.5, 0.5, 1.5, 1.5};

array pos1(2, 2, pv1);

array interp =

approx2

(input, pos0, pos1);

AFAPI array approx2(const array &in, const array &pos0, const array &pos1, const interpType method=AF_INTERP_LINEAR, const float off_grid=0.0f)

C++ Interface for data interpolation on two-dimensional signals.

◆ approx2() [2/2] AFAPI array approx2 ( const arrayin, const arraypos0, const int  interp_dim0, const double  idx_start_dim0, const double  idx_step_dim0, const arraypos1, const int  interp_dim1, const double  idx_start_dim1, const double  idx_step_dim1, const interpType  method = AF_INTERP_LINEAR, const float  off_grid = 0.0f  )

C++ Interface for data interpolation on two-dimensional signals.

The following version of the approx2() accepts the two dimensions to perform the interpolation along the input. It also accepts start and step values which define the uniform range of corresponding indices.

Parameters
[in] in is the multidimensional input array. [in] pos0 positions of the interpolation points along interp_dim0. [in] interp_dim0 is the first dimension to perform interpolation across. [in] idx_start_dim0 is the first index value along interp_dim0. [in] idx_step_dim0 is the uniform spacing value between subsequent indices along interp_dim0. [in] pos1 positions of the interpolation points along interp_dim1. [in] interp_dim1 is the second dimension to perform interpolation across. [in] idx_start_dim1 is the first index value along interp_dim1. [in] idx_step_dim1 is the uniform spacing value between subsequent indices along interp_dim1. [in] method is the interpolation method to be used. All interpolation types defined in af_interp_type are supported. [in] off_grid is the default value for any indices outside the valid range of indices.
Returns
the interpolated array.

The code sample below demonstrates usage:

float input_vals[9] = {1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0};

array input(3, 3, input_vals);

float pv0[4] = {0.5, 1.5, 0.5, 1.5};

array pos0(2, 2, pv0);

float pv1[4] = {0.5, 0.5, 1.5, 1.5};

array pos1(2, 2, pv1);

const double idx_start_dim0 = 0.0;

const double idx_step_dim0 = 1.0;

const int interp_dim0 = 0;

const int interp_dim1 = 1;

array interp =

approx2

(input, pos0, interp_dim0, idx_start_dim0, idx_step_dim0, pos1,

interp_dim1, idx_start_dim0, idx_step_dim0);


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4