## MB03AE

### Reducing the first column of a real Wilkinson shift polynomial for a product of matrices to the first unit vector (variant with partial evaluation, Hessenberg factor is the first one)

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

Purpose

      To compute two Givens rotations (C1,S1) and (C2,S2) such that the
      orthogonal matrix

                [ Q  0 ]        [  C1  S1  0 ]   [ 1  0   0  ]
            Z = [      ],  Q := [ -S1  C1  0 ] * [ 0  C2  S2 ],
                [ 0  I ]        [  0   0   1 ]   [ 0 -S2  C2 ]

      makes the first column of the real Wilkinson double shift
      polynomial of the product of matrices in periodic upper Hessenberg
      form, stored in the array A, parallel to the first unit vector.
      Only the rotation defined by C1 and S1 is used for the real
      Wilkinson single shift polynomial (see SLICOT Library routines
      MB03BE or MB03BF). All factors whose exponents differ from that of
      the Hessenberg factor are assumed nonsingular. The trailing 2-by-2
      submatrix and the five nonzero elements in the first two columns
      of the matrix product are evaluated when a double shift is used.

Specification

          SUBROUTINE MB03AE( SHFT, K, N, AMAP, S, SINV, A, LDA1, LDA2, C1,
         $                   S1, C2, S2 )
    C     .. Scalar Arguments ..
          CHARACTER         SHFT
          INTEGER           K, LDA1, LDA2, N, SINV
          DOUBLE PRECISION  C1, C2, S1, S2
    C     .. Array Arguments ..
          INTEGER           AMAP(*), S(*)
          DOUBLE PRECISION  A(LDA1,LDA2,*)

Arguments

Mode Parameters

      SHFT    CHARACTER*1
              Specifies the number of shifts employed by the shift
              polynomial, as follows:
              = 'D':  two shifts (assumes N > 2);
              = 'S':  one real shift.

Input/Output Parameters

      K       (input)  INTEGER
              The number of factors.  K >= 1.

      N       (input)  INTEGER
              The order of the factors.  N >= 2.

      AMAP    (input)  INTEGER array, dimension (K)
              The map for accessing the factors, i.e., if AMAP(I) = J,
              then the factor A_I is stored at the J-th position in A.
              AMAP(1) is the pointer to the Hessenberg matrix.

      S       (input)  INTEGER array, dimension (K)
              The signature array. Each entry of S must be 1 or -1.

      SINV    (input)  INTEGER
              Signature multiplier. Entries of S are virtually
              multiplied by SINV.

      A       (input)  DOUBLE PRECISION array, dimension (LDA1,LDA2,K)
              The leading N-by-N-by-K part of this array must contain
              the product (implicitly represented by its K factors)
              in periodic upper Hessenberg form.

      LDA1    INTEGER
              The first leading dimension of the array A.  LDA1 >= N.

      LDA2    INTEGER
              The second leading dimension of the array A.  LDA2 >= N.

      C1      (output)  DOUBLE PRECISION
      S1      (output)  DOUBLE PRECISION
              On exit, C1 and S1 contain the parameters for the first
              Givens rotation.

      C2      (output)  DOUBLE PRECISION
      S2      (output)  DOUBLE PRECISION
              On exit, if SHFT = 'D' and N > 2, C2 and S2 contain the
              parameters for the second Givens rotation. Otherwise,
              C2 = 1, S2 = 0.

Method

      The necessary elements of the real Wilkinson double/single shift
      polynomial are computed, and suitable Givens rotations are found.
      For numerical reasons, this routine should be called when
      convergence difficulties are encountered.

Further Comments

      None

Example

Program Text

      None

Program Data

      None

Program Results

      None

Return to Supporting Routines index