Navigation

Operators and Keywords

Function List:

C++ API

: [L, U] = luupdate (L, U, x, y)
: [L, U, P] = luupdate (L, U, P, x, y)

Given an LU factorization of a real or complex matrix A = L*U, L lower unit trapezoidal and U upper trapezoidal, return the LU factorization of A + x*y.’, where x and y are column vectors (rank-1 update) or matrices with equal number of columns (rank-k update).

Optionally, row-pivoted updating can be used by supplying a row permutation (pivoting) matrix P; in that case, an updated permutation matrix is returned. Note that if L, U, P is a pivoted LU factorization as obtained by lu:

[L, U, P] = lu (A);

then a factorization of A+x*y.' can be obtained either as

[L1, U1] = lu (L, U, P*x, y)

or

[L1, U1, P1] = lu (L, U, P, x, y)

The first form uses the unpivoted algorithm, which is faster, but less stable. The second form uses a slower pivoted algorithm, which is more stable.

The matrix case is done as a sequence of rank-1 updates; thus, for large enough k, it will be both faster and more accurate to recompute the factorization from scratch.

See also: lu, cholupdate, qrupdate.

Package: octave