Solve a system of equations. More...
Functions | |
AFAPI array | solveLU (const array &a, const array &piv, const array &b, const matProp options=AF_MAT_NONE) |
C++ Interface to solve a system of equations. More... | |
AFAPI af_err | af_solve_lu (af_array *x, const af_array a, const af_array piv, const af_array b, const af_mat_prop options) |
C Interface to solve a system of equations. More... | |
Solve a system of equations.
This function takes a co-efficient matrix \(A\) and an output matrix \(B\) as inputs to solve the following equation for \(X\), \(A * X = B\).
This operation can be done in ArrayFire using the following code snippet.
This function, along with af::lu, split up the task af::solve performs for square matrices.
This function is beneficial over af::solve only in long running application where the coefficient matrix \(A\) stays the same, but the observed variables keep changing.
AFAPI af_err af_solve_lu | ( | af_array * | x, |
const af_array | a, | ||
const af_array | piv, | ||
const af_array | b, | ||
const af_mat_prop | options | ||
) |
C Interface to solve a system of equations.
The options
parameter currently must be AF_MAT_NONE.
[out] | x | matrix of unknown variables |
[in] | a | packed LU decomposition of the coefficient matrix |
[in] | piv | pivot array from the packed LU decomposition of the coefficient matrix |
[in] | b | measured values |
[in] | options | determines various properties of matrix a |
AFAPI array solveLU | ( | const array & | a, |
const array & | piv, | ||
const array & | b, | ||
const matProp | options = AF_MAT_NONE |
||
) |
C++ Interface to solve a system of equations.
The options
parameter currently must be AF_MAT_NONE.
This function is not supported in GFOR.
[in] | a | packed LU decomposition of the coefficient matrix |
[in] | piv | pivot array from the packed LU decomposition of the coefficient matrix |
[in] | b | measured values |
[in] | options | determines various properties of matrix a |
x
, the matrix of unknown variables