Documentation
|
|
The C++ interface for diff. More...
| array | diff1 (const array &in, int dim=-1) |
| array | diff2 (const array &in, int dim=-1) |
The C++ interface for diff.
The difference functions compute either the first or second order difference between adjacent elements in an array along a given dimension.
diff1 computes the first order difference (basic adjacent difference) along a given dimension. If the input array has N elements in the dimension of interest, the resulting array has N-1 elements along the given dimension.
diff2 computes the second order difference (i.e. the difference between the adjacent first order differences) along a given dimension.
| array af::diff1 | ( | const array & | in, |
| int | dim = -1 |
||
| ) |
| [in] | in | |
| [in] | dim | dimension along which to operate (-1 indicates first non-singleton dimension) |
| array af::diff2 | ( | const array & | in, |
| int | dim = -1 |
||
| ) |
| [in] | in | |
| [in] | dim | dimension along which to operate (-1 indicates first non-singleton dimension) |