Matrix::SVDGen Method

Overload List

#SignatureDescription
1int SVDGen(TMtx *B, TVec *C, TVec *S, TMtx *U, TMtx *V, TMtx *Q) const;Computes generalized singular value decomposition.
2int SVDGen(TMtx *B, TVec *C, TVec *S) const;

Overload 1: int SVDGen(TMtx *B, TVec *C, TVec *S, TMtx *U, TMtx *V, TMtx *Q) const;

Computes generalized singular value decomposition.

#NameTypeDescription
1BTMtx *
2CTVec *
3STVec *
4UTMtx *
5VTMtx *
6QTMtx *
Remarks:

Computes the generalized singular value decomposition (GSVD) of an M-by-N real matrix A and P-by-N real matrix B:

U'*A*Q = D1*( 0 R ),    V'*B*Q = D2*( 0 R )

where U, V and Q are orthogonal matrices, and Z' is the transpose of Z. The routine computes optionally the orthogonal transformation matrices U, V and Q. D1 and D2 are diagonal matrices, which on their diagonals contain C and S.

             K  L
D1 =     K [ I  0 ]
         L [ 0  C ]
     M-K-L [ 0  0 ]

             K  L
D2 =     L [ 0  S ]
       P-L [ 0  0 ]

The generalized singular values, stored in C and S on exit, have the property:

sqr(C) + sqr(S) = I

The generalized singular value pairs of A and B in case of rank deficiency are stored like this:

c(0:k-1) = 1,
s(0:k-1) = 0,

and if m-k-l = 0,

c(k:k+l-1) = C,
s(k:k+l-1) = S,

or if m-k-l < 0,

c(k:m-1)= C, c(m:k+l-1)=0
s(k:m-1) = S, s(m:k+l-1) = 1

and

c(k+l:n-1) = 0
s(k+l:n-1) = 0

Effective rank is k + l.

If B is an N-by-N nonsingular matrix, then the GSVD of A and B implicitly gives the SVD of A*inv(B):

A*inv(B] := U*(D1*inv(D2))*V'

If ( A',B')' has orthonormal columns, then the GSVD of A and B is also equal to the CS decomposition of A and B. Furthermore, the GSVD can be used to derive the solution of the eigenvalue problem:

A'*A X := lambda* B'*B X

In some literature, the GSVD of A and B is presented in the form

U'*A*X := ( 0 D1 ),   V'*B*X := ( 0 D2 )

where U and V are orthogonal and X is nonsingular, D1 and D2 are "diagonal". The former GSVD form can be converted to the latter form by taking the nonsingular matrix X as:

X := Q*( I   0    )
       ( 0 inv(R) )

The function returns the effective numerical rank of (A', B') = K + L.

Reference: Lapack v3.4 source code

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 2: int SVDGen(TMtx *B, TVec *C, TVec *S) const;

#NameTypeDescription
1BTMtx *
2CTVec *
3STVec *
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler