## MB04QS

### Multiplication with a product of symplectic reflectors and Givens rotations

[Specification] [Arguments] [Method] [References] [Comments] [Example]

Purpose

      Overwrites general real m-by-n/n-by-m matrices C and D with

                [ op(C) ]
          U  *  [       ]   if TRANU = 'N', or
                [ op(D) ]

           T    [ op(C) ]
          U  *  [       ]   if TRANU = 'T',
                [ op(D) ]

      where U is defined as the product of symplectic reflectors and
      Givens rotations,

          U = diag( H(1),H(1) ) G(1) diag( F(1),F(1) )
              diag( H(2),H(2) ) G(2) diag( F(2),F(2) )
                                ....
              diag( H(k),H(k) ) G(k) diag( F(k),F(k) ),

      with k = m-1, as returned by the SLICOT Library routines MB04PU
      or MB04RU.

Specification

          SUBROUTINE MB04QS( TRANC, TRAND, TRANU, M, N, ILO, V, LDV, W, LDW,
         $                   C, LDC, D, LDD, CS, TAU, DWORK, LDWORK, INFO )
    C     .. Scalar Arguments ..
          CHARACTER         TRANC, TRAND, TRANU
          INTEGER           ILO, INFO, LDC, LDD, LDV, LDW, LDWORK, M, N
    C     .. Array Arguments ..
          DOUBLE PRECISION  C(LDC,*), CS(*), D(LDD,*), DWORK(*), TAU(*),
         $                  V(LDV,*), W(LDW,*)

Arguments

Mode Parameters

      TRANC   CHARACTER*1
              Specifies the form of op( C ) as follows:
              = 'N':  op( C ) = C;
              = 'T':  op( C ) = C';
              = 'C':  op( C ) = C'.

      TRAND   CHARACTER*1
              Specifies the form of op( D ) as follows:
              = 'N':  op( D ) = D;
              = 'T':  op( D ) = D';
              = 'C':  op( D ) = D'.

      TRANU   CHARACTER*1
              Specifies whether U or U' is applied as follows:
              = 'N':  apply U;
              = 'T':  apply U'.

Input/Output Parameters

      M       (input) INTEGER
              The number of rows of the matrices op(C) and op(D).
              M >= 0.

      N       (input) INTEGER
              The number of columns of the matrices op(C) and op(D).
              N >= 0.

      ILO     (input) INTEGER
              ILO must have the same value as in the previous call of
              MB04PU or MB04RU. U is equal to the unit matrix except in
              the submatrix
              U([ilo+1:m m+ilo+1:2*m], [ilo+1:m m+ilo+1:2*m]).
              1 <= ILO <= M+1.

      V       (input) DOUBLE PRECISION array, dimension (LDV,M)
              On entry, the leading M-by-M part of this array must
              contain in its columns the vectors which define the
              elementary reflectors H(i).

      LDV     INTEGER
              The leading dimension of the array V.  LDV >= MAX(1,M).

      W       (input) DOUBLE PRECISION array, dimension (LDW,M)
              On entry, the leading M-by-M part of this array must
              contain in its columns the vectors which define the
              elementary reflectors F(i).

      LDW     INTEGER
              The leading dimension of the array W.  LDW >= MAX(1,M).

      C       (input/output) DOUBLE PRECISION array, dimension
                      (LDC,N) if TRANC = 'N',
                      (LDC,M) if TRANC = 'T' or TRANC = 'C'.
              On entry with TRANC = 'N', the leading M-by-N part of this
              array must contain the matrix C.
              On entry with TRANC = 'T' or TRANC = 'C', the leading
              N-by-M part of this array must contain the transpose of
              the matrix C.
              On exit with TRANC = 'N', the leading M-by-N part of this
              array contains the updated matrix C.
              On exit with TRANC = 'T' or TRANC = 'C', the leading
              N-by-M part of this array contains the transpose of the
              updated matrix C.

      LDC     INTEGER
              The leading dimension of the array C.
              LDC >= MAX(1,M),  if TRANC = 'N';
              LDC >= MAX(1,N),  if TRANC = 'T' or TRANC = 'C'.

      D       (input/output) DOUBLE PRECISION array, dimension
                      (LDD,N) if TRAND = 'N',
                      (LDD,M) if TRAND = 'T' or TRAND = 'C'.
              On entry with TRAND = 'N', the leading M-by-N part of this
              array must contain the matrix D.
              On entry with TRAND = 'T' or TRAND = 'C', the leading
              N-by-M part of this array must contain the transpose of
              the matrix D.
              On exit with TRAND = 'N', the leading M-by-N part of this
              array contains the updated matrix D.
              On exit with TRAND = 'T' or TRAND = 'C', the leading
              N-by-M part of this array contains the transpose of the
              updated matrix D.

      LDD     INTEGER
              The leading dimension of the array D.
              LDD >= MAX(1,M),  if TRAND = 'N';
              LDD >= MAX(1,N),  if TRAND = 'T' or TRAND = 'C'.

      CS      (input) DOUBLE PRECISION array, dimension (2*N-2)
              On entry, the first 2*N-2 elements of this array must
              contain the cosines and sines of the symplectic Givens
              rotations G(i), as returned by MB04PU or MB04RU.

      TAU     (input) DOUBLE PRECISION array, dimension (N-1)
              On entry, the first N-1 elements of this array must
              contain the scalar factors of the elementary reflectors
              F(i), as returned by MB04PU or MB04RU.

Workspace

      DWORK   DOUBLE PRECISION array, dimension (LDWORK)
              On exit, if INFO = 0,  DWORK(1)  returns the optimal value
              of LDWORK.
              On exit, if  INFO = -18,  DWORK(1)  returns the minimum
              value of LDWORK.

      LDWORK  INTEGER
              The length of the array DWORK.  LDWORK >= MAX(1,N).

              If LDWORK = -1, then a workspace query is assumed;
              the routine only calculates the optimal size of the
              DWORK array, returns this value as the first entry of
              the DWORK array, and no error message related to LDWORK
              is issued by XERBLA.

Error Indicator

      INFO    INTEGER
              = 0:  successful exit;
              < 0:  if INFO = -i, the i-th argument had an illegal
                    value.

Further Comments

      None

Example

Program Text

      None

Program Data

      None

Program Results

      None

Return to Supporting Routines index