Extract the diagonal from an array. More...
Functions | |
AFAPI array | diag (const array &in, const int num=0, const bool extract=true) |
C++ Interface to extract the diagonal from an array. More... | |
AFAPI af_err | af_diag_create (af_array *out, const af_array in, const int num) |
C Interface to create a diagonal matrix from an extracted diagonal array. More... | |
AFAPI af_err | af_diag_extract (af_array *out, const af_array in, const int num) |
C Interface to extract the diagonal from an array. More... | |
Extract the diagonal from an array.
If extract
is true, an array is extracted containing diagonal of the matrix, while a false condition returns a diagonal matrix.
C Interface to create a diagonal matrix from an extracted diagonal array.
See also, af_diag_extract.
[out] | out | diagonal matrix |
[in] | in | diagonal array |
[in] | num | diagonal index |
C Interface to extract the diagonal from an array.
See also, af_diag_create.
[out] | out | num -th diagonal array |
[in] | in | input array |
[in] | num | diagonal index |
C++ Interface to extract the diagonal from an array.
[in] | in | input array |
[in] | num | diagonal index |
[in] | extract | if true, returns an array containing diagonal of the matrix; if false, returns a diagonal matrix |