functioncholeskyDownDate2
Extends from Modelica.Icons.Function (Icon for functions).
Information
Syntax
Ldd = Matrices.choleskyDownDate(L, v); Ldd = Matrices.choleskyDownDate(L, v, true);
Description
This function computes the rank-1-downdated Cholesky factorization Ldd, with
Add = Ldd*LddT = A - v*vT = L*LT - v*vT
from the input L, i.e. the left (lower) Cholesky factor of the original matrix A. The algorithm is taken from [1].
Matrix Ldd is calculated by
[v, Ldd]T = H *[0, L]T
with orthogonal Matrix H such that
v*vT + Ldd*LddT = [v, Ldd] * [v, Ldd]T = [0, L]*HT *H*[0, L]T = [0, L]*[0, L]T = L*LT = A,
i.e., by orthogonal transformation
H = H_1*...*H_n.
The matrices H_i are Givens matrices computed such that
H_1*H_2*...*H_n*[z, aT]T = [1, 0, ..., 0]T,
with a is the solution of
L*a = v
and
z = ||a||.
The following sequence illustrate the principle of calculating the H_i, starting with H_n
|z| |z| |z| |z| |a| H_3 |a| H_2 |a| H_1 |0| |a| ----> |a| ---> |0| ---> |0| |a| |0| |0| |0|
Note, that the z and a are different in each column. It is shown in [1] that this algorithm results in the modified Cholesky factor Ldd.
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 Ldd is also upper triangular. Default is "upper==false".
References
- [1] Dongarra J. J., Bunch J. R., Moler G. B., Stewart G.W. (1987):
- LINPACK Users' Guide.
Society for Industrial Mathematics.
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 |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real[size(L, 1),size(L, 2)] | Ldd | if upper then symmetric(L) else L | Updated Cholesky factor |
| Integer | infoOut |
Revisions
| Date | Author | Comment |
|---|---|---|
| 2010-05-31 | Marcus Baur, DLR-RM | Realization |