Perform Cholesky decomposition. More...
Functions | |
AFAPI int | cholesky (array &out, const array &in, const bool is_upper=true) |
C++ Interface to perform Cholesky decomposition. More... | |
AFAPI int | choleskyInPlace (array &in, const bool is_upper=true) |
C++ Interface to perform in-place Cholesky decomposition. More... | |
AFAPI af_err | af_cholesky (af_array *out, int *info, const af_array in, const bool is_upper) |
C Interface to perform Cholesky decomposition. More... | |
AFAPI af_err | af_cholesky_inplace (int *info, af_array in, const bool is_upper) |
C Interface to perform in-place Cholesky decomposition. More... | |
Perform Cholesky decomposition.
This function decomposes a positive definite matrix \(A\) into two triangular matrices such that, \(A = L * U\) and \(L = U^T\).
Only one of \(L\) and \(U\) is stored to conserve space when solving linear equations.
This operation can be performed in ArrayFire using the following code snippet.
When memory is a concern, users can perform Cholesky decomposition in place as shown below.
C Interface to perform Cholesky decomposition.
Multiplying out
with its conjugate transpose reproduces the input in
.
The input must be positive definite.
[out] | out | triangular matrix; |
[out] | info | 0 if cholesky decomposition passes; if not, it returns the rank at which the decomposition fails |
[in] | in | input matrix |
[in] | is_upper | boolean determining if out is upper or lower triangular |
C Interface to perform in-place Cholesky decomposition.
The input must be positive definite.
[out] | info | 0 if cholesky decomposition passes; if not, it returns the rank at which the decomposition fails |
[in,out] | in | input matrix on entry; triangular matrix on exit |
[in] | is_upper | boolean determining if in is upper or lower triangular |
C++ Interface to perform Cholesky decomposition.
Multiplying out
with its conjugate transpose reproduces the input in
.
The input must be positive definite.
This function is not supported in GFOR.
[out] | out | triangular matrix; |
[in] | in | input matrix |
[in] | is_upper | boolean determining if out is upper or lower triangular |
0
if cholesky decomposition passes; if not, it returns the rank at which the decomposition fails C++ Interface to perform in-place Cholesky decomposition.
The input must be positive definite.
This function is not supported in GFOR.
[in,out] | in | input matrix on entry; triangular matrix on exit |
[in] | is_upper | boolean determining if in is upper or lower triangular |
0
if cholesky decomposition passes; if not, it returns the rank at which the decomposition fails