Matrix Equations Utilities
MatrixEquations.utqu — FunctionX = utqu(Q,U)Compute efficiently the symmetric/hermitian product X = U'QU, where Q is a symmetric/hermitian matrix.
MatrixEquations.utqu! — Functionutqu!(Q,U) -> QCompute efficiently the symmetric/hermitian product U'QU -> Q, where Q is a symmetric/hermitian matrix and U is a square matrix. The resulting product overwrites Q.
MatrixEquations.qrupdate! — Functionqrupdate!(R, Y) -> RUpdate the upper triangular factor R by the upper triangular factor of the QR factorization of [ R; Y' ], where Y is a low-rank matrix Y (typically with one or two columns). The computation of R only uses O(n^2) operations (n is the size of R). The input matrix R is updated in place and the matrix Y is destroyed during the computation.
MatrixEquations.rqupdate! — Functionrqupdate!(R, Y) -> RUpdate the upper triangular factor R by the upper triangular factor of the RQ factorization of [ Y R], where Y is a low-rank matrix Y (typically with one or two columns). The computation of R only uses O(n^2) operations (n is the size of R). The input matrix R is updated in place and the matrix Y is destroyed during the computation.
MatrixEquations.isschur — Function isschur(A::AbstractMatrix) -> BoolTest whether A is a square matrix in a real or complex Schur form. In the real case, it is only tested whether A is a quasi upper triangular matrix, which may have 2x2 diagonal blocks, which however must not correspond to complex conjugate eigenvalues. In the complex case, it is tested if A is upper triangular.
isschur(A::AbstractMatrix, B::AbstractMatrix) -> BoolTest whether (A,B) is a pair of square matrices in a real or complex generalized Schur form. In the real case, it is only tested whether B is upper triangular and A is a quasi upper triangular matrix, which may have 2x2 diagonal blocks, which however must not correspond to complex conjugate eigenvalues. In the complex case, it is tested if A and B are both upper triangular.
MatrixEquations.triu2vec — Functionx = triu2vec(Q; rowwise = false, her = false)Reshape the upper triangular part of the nxn array Q as a one-dimensional column vector x with n(n+1)/2 elements. Q is assumed symmetric/hermitian if her = true. The elements of x correspond to stacking the elements of successive columns of the upper triangular part of Q, if rowwise = false, or stacking the elements of successive rows of the upper triangular part of Q, if rowwise = true.
MatrixEquations.vec2triu — FunctionQ = vec2triu(x; rowwise = false, her = false)Build from a one-dimensional column vector x with n(n+1)/2 elements an nxn upper triangular matrix Q if her = false or an nxn symmetric/hermitian array Q if her = true. The elements of x correspond to stacking the elements of successive columns of the upper triangular part of Q, if rowwise = false, or stacking the elements of successive rows of the upper triangular part of Q, if rowwise = true.