Functions | |
| JRLQP_DLLAPI bool | blockArrowLLT (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &side, bool up=false) |
| JRLQP_DLLAPI void | blockArrowLSolve (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &side, bool up, MatrixRef M, int start=0, int end=-1) |
| JRLQP_DLLAPI void | blockArrowLTransposeSolve (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &side, bool up, MatrixRef M, int start=0, int end=-1) |
| JRLQP_DLLAPI bool | triBlockDiagLLT (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &subDiag) |
| JRLQP_DLLAPI void | triBlockDiagLSolve (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &subDiag, MatrixRef M, int start=0) |
| JRLQP_DLLAPI void | triBlockDiagLTransposeSolve (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &subDiag, MatrixRef M, int end=-1) |
| template<bool Up> | |
| bool | blockArrowLLT_ (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &side) |
| template<bool Up> | |
| void | blockArrowLSolve_ (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &side, MatrixRef M, int start, int end) |
| template<bool Up> | |
| void | blockArrowLTransposeSolve_ (const std::vector< MatrixRef > &diag, const std::vector< MatrixRef > &side, MatrixRef M, int start, int end) |
| bool jrl::qp::decomposition::blockArrowLLT | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | side, | ||
| bool | up = false |
||
| ) |
Cholesky decomposition of a matrix of the form (arrow-like)
\( \begin{bmatrix} D_1 & S_1^T & S_2^T & \cdots \\ S_1 & D_2 & & \\ S_2 & & D_3 & \\ \vdots & & & \ddots \\ \end{bmatrix}\) (up = true) or \( \begin{bmatrix} D_1 & & & S_1^T \\ &\ddots & & \vdots \\ & & D_{b-1} & S_{b-1}^T \\ S_1 &\cdots & S_{b-1} & Db \\ \end{bmatrix}\) (up = false)
| diag | blocks \( D_i \) on the diagonal. Only the lower triangular part is actually used. |
| side | blocks \( S_i \). |
| up | Whether the arrow is poiting up or down. |
If up = false, the decomposition \( M = L L^T\) is performed. If up = true, the decomposition \( P^T M P = L L^T \) is performed, where
\( \begin{bmatrix} 0 &\cdots & 0 & I \\ I & & & 0 \\ &\ddots & & \vdots \\ & & I & 0 \\ \end{bmatrix}\) is such that \( P^T M P = \begin{bmatrix} D_2 & & & S_1 \\ &\ddots & & \vdots \\ & & D_b & S_{b-1} \\ S_1^T &\cdots & S_{b-1}^T & D1 \\ \end{bmatrix} \)
Then, \( L \) is such that
\( L = \begin{bmatrix} L_1 & & & \\ & L_2 & & \\ & &\ddots & \\ B_1 & B_2 &\cdots & L_b \\ \end{bmatrix}\) (up = false) or \( L = \begin{bmatrix} L_2 & & & \\ &\ddots & & \\ & & L_b & \\ B_1 &\cdots & B_{b-1} & L_1 \\ \end{bmatrix}\) (up = true)
and upon return \( D_i \) contains \( L_i \), and \( S_i \) contains \( B_i \) if up = false or \( B_i^T \) if up = true. Only the lower triangular part of \( D_i \) is used to store \( L_i \). Its upper part remains whatever was there originally.
| bool jrl::qp::decomposition::blockArrowLLT_ | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | side | ||
| ) |
| void jrl::qp::decomposition::blockArrowLSolve | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | side, | ||
| bool | up, | ||
| MatrixRef | M, | ||
| int | start = 0, |
||
| int | end = -1 |
||
| ) |
Solve in place the system P L X = M where L is the triangular factor obtained from blockArrowLLT and P is a permutation depending on up.
| diag | blocks on the diagonal of L. Only the lower triangular part is actually used. |
| side | non zero blocks under the diagonal. |
| M | right hand side of the equation (matrix or vector). Contains the solution upon return. |
| start | First row of M that is not 0. Useful for optimizing computations. |
| end | First row of the terminal 0 block in M. If end < 0, M has no terminal 0 block. Useful for optimizing computations. |
| void jrl::qp::decomposition::blockArrowLSolve_ | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | side, | ||
| MatrixRef | M, | ||
| int | start, | ||
| int | end | ||
| ) |
| void jrl::qp::decomposition::blockArrowLTransposeSolve | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | side, | ||
| bool | up, | ||
| MatrixRef | M, | ||
| int | start = 0, |
||
| int | end = -1 |
||
| ) |
Solve in place the system L^T P^T X = M where L is the triangular factor obtained from blockArrowLLT and P is a permutation depending on up.
| diag | blocks on the diagonal of L. Only the lower triangular part is actually used. |
| side | non zero blocks under the diagonal. |
| M | right hand side of the equation (matrix or vector). Contains the solution upon return. |
| start | First row of M that is not 0. Useful for optimizing computations. |
| end | First row of the terminal 0 block in M. If end < 0, M has no terminal 0 block. Useful for optimizing computations. |
| void jrl::qp::decomposition::blockArrowLTransposeSolve_ | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | side, | ||
| MatrixRef | M, | ||
| int | start, | ||
| int | end | ||
| ) |
| bool jrl::qp::decomposition::triBlockDiagLLT | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | subDiag | ||
| ) |
Cholesky decomposition of a matrix of the form
\( \begin{bmatrix} D_1 & S_1^T & & & \\ S_1 & D_2 & S_2^T & & \\ & S_2 & D_3 & S_3^T & \\ & &\ddots &\ddots &\ddots \\ \end{bmatrix}\)
| diag | blocks \( D_i \) on the diagonal. Only the lower triangular part is actually used. |
| subDiag | blocks \( S_i \) under the diagonal. |
The decomposition is done in place: the Cholesky factor is
\( \begin{bmatrix} L_1 & & & \\ B_1 & L_2 & & \\ & B_2 & L_3 & \\ & &\ddots &\ddots \\ \end{bmatrix}\)
and upon return \( D_i \) contains \( L_i \) and \( S_i \) contains \( B_i \). Only the lower triangular part of \( D_i \) is used to store \( L_i \). Its upper part remains whatever was there originally.
| void jrl::qp::decomposition::triBlockDiagLSolve | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | subDiag, | ||
| MatrixRef | M, | ||
| int | start = 0 |
||
| ) |
Solve in place the system L X = M where L is the triangular factor obtained from triBlockDiagLLT.
| diag | blocks on the diagonal of L. Only the lower triangular part is actually used. |
| subDiag | blocks under the diagonal. |
| M | right hand side of the equation (matrix or vector). Contains the solution upon return. |
| start | First row of M that is not 0. Useful for optimizing computations. |
| void jrl::qp::decomposition::triBlockDiagLTransposeSolve | ( | const std::vector< MatrixRef > & | diag, |
| const std::vector< MatrixRef > & | subDiag, | ||
| MatrixRef | M, | ||
| int | end = -1 |
||
| ) |
Solve in place the system L^T X = M where L is the triangular factor obtained from triBlockDiagLLT.
| diag | blocks on the diagonal of L. Only the lower triangular part is actually used. |
| subDiag | blocks under the diagonal. |
| M | right hand side of the equation (matrix or vector). Contains the solution upon return. |
| end | Writing M = [N 0]^T, end is the index of the first row of the terminal 0 block. If end<0 (default value), M has no terminal 0 block. |