Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx *LQRSolve(TMtx *B, TMtx *X, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone); | Solve overdetermined or underdetermined system of real linear equations. |
| 2 | TMtx *LQRSolve(TVec *B, TVec *X, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone); | Matrix version of LQRSolve. Perfroms a LQRSolve for each B and X matrices columns in single pass. |
| 3 | int LQRSolve(TVec *B, TVec *X, double rcond, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone); | Rank deficient version of LQRSolve. Perfroms LQRSolve for B vector. |
| 4 | int LQRSolve(TMtx *B, TMtx *X, double rcond, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone); | Rank deficient version of LQRSolve. Perfroms LQRSolve for each B column in one pass. |
Overload 1: TMtx *LQRSolve(TMtx *B, TMtx *X, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone);
Solve overdetermined or underdetermined system of real linear equations.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | B | TMtx * | |
| 2 | X | TMtx * | |
| 3 | R = null | TMtx * | |
| 4 | op = TMtxOperation::opNone | TMtxOperation |
Solve overdetermined or underdetermined real linear systems involving a Rows-by-Cols matrix or its transpose, using a QR or LQ factorization of the calling matrix. It is assumed that the calling matrix has full rank. The following options are provided:
*1.*If Op = opNone and m >= n: find the least squares solution of an overdetermined system, i.e., solve
the least squares problem
minimize || B - A*X ||.
*2.*If Op = opNone and m < n: find the minimum norm solution of an underdetermined system
A * X = B.
*3.*If Op = opTrans and m >= n: find the minimum norm solution of an undetermined system
A**T * X = B.
*4.*If Op = opTran and m < n: find the least squares solution of an overdetermined system, i.e., solve
the least squares problem
minimize || B - A**T * X ||
*5.*If Op = opHerm and m >= n: find the minimum norm solution of an undetermined system
A**H * X = B.
*6.*If Op = opHerm and m < n: find the least squares solution of an overdetermined system, i.e., solve
the least squares problem
minimize || B - A**H * X ||.
Note
If the parameters are of TVec type (vectors), the routine requires less pre and post processing.
Overload 2: TMtx *LQRSolve(TVec *B, TVec *X, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone);
Matrix version of LQRSolve. Perfroms a LQRSolve for each B and X matrices columns in single pass.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | B | TVec * | |
| 2 | X | TVec * | |
| 3 | R = null | TMtx * | |
| 4 | op = TMtxOperation::opNone | TMtxOperation |
Overload 3: int LQRSolve(TVec *B, TVec *X, double rcond, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone);
Rank deficient version of LQRSolve. Perfroms LQRSolve for B vector.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | B | TVec * | |
| 2 | X | TVec * | |
| 3 | rcond | double | |
| 4 | R = null | TMtx * | |
| 5 | op = TMtxOperation::opNone | TMtxOperation |
Computes the minimum-norm solution to a linear least squares problem:
minimize || A * X - B ||
using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient.
The function returns the effective rank of the matrix A. The effective rank is determined with the rcond parameter. A is factorized in such a way that condition number of leading submatrix of A will be less then 1/rcond. Set value of rcond to 1E-6 for less strict and to 1E-3 for more strict stability conditition. If R is assigned, the function returns the factorization of matrix A. Op parameter specified the operation to be applied to A before the computation.
Overload 4: int LQRSolve(TMtx *B, TMtx *X, double rcond, TMtx *R = null, TMtxOperation op = TMtxOperation::opNone);
Rank deficient version of LQRSolve. Perfroms LQRSolve for each B column in one pass.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | B | TMtx * | |
| 2 | X | TMtx * | |
| 3 | rcond | double | |
| 4 | R = null | TMtx * | |
| 5 | op = TMtxOperation::opNone | TMtxOperation |
Computes the minimum-norm solution to a linear least squares problem:
minimize || A * X - B ||
using a complete orthogonal factorization of A. A is an M-by-N matrix which may be rank-deficient.
The function returns the effective rank of the matrix A. The effective rank is determined with the rcond parameter. A is factorized in such a way that condition number of leading submatrix of A will be less then 1/rcond. Set value of rcond to 1E-6 for less strict and to 1E-3 for more strict stability conditition. If R is assigned, the function returns the factorization of matrix A. Op parameter specified the operation to be applied to A before the computation.