diff2

Functions
diff2
Complete List of ArrayFire Functions ArrayFire Functions by Category » Vector Algorithms » | Numerical differentiation

Second order numerical difference along specified dimension. More...

## Functions
AFAPI array | diff2 (const array &in, const int dim=0)
| C++ Interface for calculating second order differences in an array. More...
AFAPI af_err | af_diff2 (af_array *out, const af_array in, const int dim)
| C Interface for calculating second order differences in an array. More...

## Detailed Description

Second order numerical difference along specified dimension.

This function performs the operation across all batches present in the input simultaneously.

## Function Documentation

## § af_diff2()

AFAPI af_err af_diff2 | ( | af_array * | out,
|  | const af_array | in,
|  | const int | dim
| ) |  |

C Interface for calculating second order differences in an array.

Parameters

  [out] | out | will contain the second order numerical differences of `in`
  [in] | in | is the input array
  [in] | dim | The dimension along which numerical difference is performed

Returns
  AF_SUCCESS if the execution completes properly

## § diff2()

AFAPI array af::diff2 | ( | const array & | in,
|  | const int | dim = `0`
| ) |  |

C++ Interface for calculating second order differences in an array.

Parameters

  [in] | in | is the input array
  [in] | dim | The dimension along which numerical difference is performed

Returns
  array of second order numerical difference