AbstractLinAlgPack_rank_2_chol_update.hpp File Reference

#include "AbstractLinAlgPack_Types.hpp"

Include dependency graph for AbstractLinAlgPack_rank_2_chol_update.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


namespace  AbstractLinAlgPack


void rank_2_chol_update (const value_type a, DVectorSlice *u, const DVectorSlice &v, DVectorSlice *w, DMatrixSliceTriEle *R, BLAS_Cpp::Transp R_trans)
 Update the cholesky factor of symmetric positive definite matrix for a rank-2 update.

Function Documentation

void AbstractLinAlgPack::rank_2_chol_update const value_type  a,
DVectorSlice u,
const DVectorSlice v,
DVectorSlice w,
DMatrixSliceTriEle R,
BLAS_Cpp::Transp  R_trans

Update the cholesky factor of symmetric positive definite matrix for a rank-2 update.

This function updates and an upper or lower triangular cholesky factor in O(n^2) flops. The basic idea is that the original symmetric positive definite matrix

       B = op(R')*op(R)
is subjected to a rank-2 update. This rank-2 update to B must be expressed in the form

       B_new = J'*J

       J = (op(R) + a*u*v')
The basic approach is to introduce an othogonal matrix Q such that

       Q*(op(R) + a*u*v') -> op(R_new)
is triangular. In other words (with I = Q'*Q)

       B_new = (op(R') + a*v*u')*Q'*Q*(op(R) + a*u*v') = op(R_new')*op(R_new)
This algorithm is based on Algorithm A3.4.1a in Dennis and Schnabel. However, it has been extended in the sense that it handles upper and lower along with transposed and nontransposed factors. It does not touch any of the elements of R outside of the designated triangular region and returns the rotations used with no extra storage space needed. This is a much nicer function than any other one that I have seen in the public domain.

It is guarrenteed that after this function finishes that the diagonal of R_new will be positive.

a [in] Scalar for update (see above).
u [in/out] (size n ) On input, contaitns the update vector u (see above). On output, contains the rotations needed for the transformation Q1*u -> ||u||2 * e(last_i). (ToDo: Document this!).
v [in] (size n )Update vector (see above).
w [out] (size n-1) On output, contains stored rotations from BLAS_Cpp::rotg(...) used to transform the upper or lower Hessenberg itermediate factor R2 back to upper or lower triangular form. (ToDo: Document this!). If n == 1 then w can be NULL.
R [in/out] (size n x n) Upper or lower triangular factor. On input the diagonal must contain all positive elements on the diagonal. On output contains the updated factor with all positive diagonal elements.
R_trans [in] Determines if op(R) = R (no_trans) or op(R) = R' (trans)

Definition at line 36 of file AbstractLinAlgPack_rank_2_chol_update.cpp.

Generated on Thu Sep 18 12:35:28 2008 for MOOCHO (Single Doxygen Collection) by doxygen