functioncholeskyUpDate
Extends from Modelica.Icons.Function (Icon for functions).
Information
Syntax
Lud = Matrices.choleskyUpDate(L, v); Lud = Matrices.choleskyUpDate(L, v, true);
Description
This function computes the rank-1-updated Cholesky factorization Lud, with
Aud = Lud*LudT = A + v*vT = L*LT + v*vT
from the input L, i.e. the left (lower) Cholesky factor of the original matrix A.
The approach is a transformation H*[v, L]' = [0, Lud]' with orthonormal matrix H such, that
[0, Lud] * [0, Lud]T = [v, L]*HT *H*[v, L]T = [v, L]*[v, L]T = v*vT + A
and matrix Lud is lower (upper) triangular. The transformation is performed by n (order of A) Givens rotations. The following sequence illustrates the principle of stepwise transformation of matrix [v, L]'. Symbol "*" represents arbitrary elements. For each step the changed elements are bold.
| v' | | * * * * | | 0 * * * | | 0 0 * * | | 0 0 0 * | | 0 0 0 0 | | | | * * * * | | * * * * | | * * * * | | * * * * | | * * * * | | L' | = | 0 * * * | -> | 0 * * * | -> | 0 * * * | -> | 0 * * * | -> | 0 * * * | | | | 0 0 * * | | 0 0 * * | | 0 0 * * | | 0 0 * * | | 0 0 * * | | | | 0 0 0 * | | 0 0 0 * | | 0 0 0 * | | 0 0 0 * | | 0 0 0 * |
With the boolean input "upper" the user specifies whether the matrix L is lower or upper triangular matrix (left or right Cholesky factor). If "upper==true", the output Lud is also upper triangular. Default is "upper==false".
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[:,size(L, 1)] | L | Cholesky factor | |
| Real[size(L, 1)] | v | Real vector A+v*v' | |
| Boolean | upper | false | True if the upper triangle of A is provided and the modified upper triangle will be returned |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[size(L, 1),size(L, 2)] | Lud | if upper then symmetric(L) else L | Updated Cholesky factor |
Revisions
| Date | Author | Comment |
|---|---|---|
| 2010-05-31 | Marcus Baur, DLR-RM | Realization |