SCSDTS

   Originally xGSVTS
   Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
   November 2006

   Adapted to SCSDTS
   July 2010

Purpose

SCSDTS tests SORCSD, which, given an M-by-M partitioned orthogonal
matrix X,
             Q  M-Q
      X = [ X11 X12 ] P   ,
          [ X21 X22 ] M-P

computes the CSD

      [ U1    ]**T * [ X11 X12 ] * [ V1    ]
      [    U2 ]      [ X21 X22 ]   [    V2 ]

                            [  I  0  0 |  0  0  0 ]
                            [  0  C  0 |  0 -S  0 ]
                            [  0  0  0 |  0  0 -I ]
                          = [---------------------] = [ D11 D12 ] .
                            [  0  0  0 |  I  0  0 ]   [ D21 D22 ]
                            [  0  S  0 |  0  C  0 ]
                            [  0  0  I |  0  0  0 ]

Arguments

M
(input) INTEGER
The number of rows of the matrix X.  M >= 0.
P
(input) INTEGER
The number of rows of the matrix X11.  P >= 0.
Q
(input) INTEGER
The number of columns of the matrix X11.  Q >= 0.
X
(input) REAL array, dimension (LDX,M)
The M-by-M matrix X.
XF
(output) REAL array, dimension (LDX,M)
Details of the CSD of X, as returned by SORCSD;
see SORCSD for further details.
LDX
(input) INTEGER
The leading dimension of the arrays X and XF.
LDX >= max( 1,M ).
U1
(output) REAL array, dimension(LDU1,P)
The P-by-P orthogonal matrix U1.
LDU1
(input) INTEGER
The leading dimension of the array U1. LDU >= max(1,P).
U2
(output) REAL array, dimension(LDU2,M-P)
The (M-P)-by-(M-P) orthogonal matrix U2.
LDU2
(input) INTEGER
The leading dimension of the array U2. LDU >= max(1,M-P).
V1T
(output) REAL array, dimension(LDV1T,Q)
The Q-by-Q orthogonal matrix V1T.
LDV1T
(input) INTEGER
The leading dimension of the array V1T. LDV1T >=
max(1,Q).
V2T
(output) REAL array, dimension(LDV2T,M-Q)
The (M-Q)-by-(M-Q) orthogonal matrix V2T.
LDV2T
(input) INTEGER
The leading dimension of the array V2T. LDV2T >=
max(1,M-Q).
THETA
(output) REAL array, dimension MIN(P,M-P,Q,M-Q)
The CS values of X; the essentially diagonal matrices C and
S are constructed from THETA; see subroutine SORCSD for
details.
IWORK
(workspace) INTEGER array, dimension (M)
WORK
(workspace) REAL array, dimension (LWORK)
LWORK
(input) INTEGER
The dimension of the array WORK
RWORK
(workspace) REAL array
RESULT
(output) REAL array, dimension (9)
The test ratios:
RESULT(1) = norm( U1'*X11*V1 - D11 ) / ( MAX(1,P,Q)*EPS2 )
RESULT(2) = norm( U1'*X12*V2 - D12 ) / ( MAX(1,P,M-Q)*EPS2 )
RESULT(3) = norm( U2'*X21*V1 - D21 ) / ( MAX(1,M-P,Q)*EPS2 )
RESULT(4) = norm( U2'*X22*V2 - D22 ) / ( MAX(1,M-P,M-Q)*EPS2 )
RESULT(5) = norm( I - U1'*U1 ) / ( MAX(1,P)*ULP )
RESULT(6) = norm( I - U2'*U2 ) / ( MAX(1,M-P)*ULP )
RESULT(7) = norm( I - V1T'*V1T ) / ( MAX(1,Q)*ULP )
RESULT(8) = norm( I - V2T'*V2T ) / ( MAX(1,M-Q)*ULP )
RESULT(9) = 0        if THETA is in increasing order and
                     all angles are in [0,pi/2];
          = ULPINV   otherwise.
( EPS2 = MAX( norm( I - X'*X ) / M, ULP ). )

Call Graph

Caller Graph