1SGEHRD(1)                LAPACK routine (version 3.2)                SGEHRD(1)
2
3
4

NAME

6       SGEHRD  - reduces a real general matrix A to upper Hessenberg form H by
7       an orthogonal similarity transformation
8

SYNOPSIS

10       SUBROUTINE SGEHRD( N, ILO, IHI, A, LDA, TAU, WORK, LWORK, INFO )
11
12           INTEGER        IHI, ILO, INFO, LDA, LWORK, N
13
14           REAL           A( LDA, * ), TAU( * ), WORK( * )
15

PURPOSE

17       SGEHRD reduces a real general matrix A to upper Hessenberg form H by an
18       orthogonal similarity transformation:  Q' * A * Q = H .
19

ARGUMENTS

21       N       (input) INTEGER
22               The order of the matrix A.  N >= 0.
23
24       ILO     (input) INTEGER
25               IHI      (input)  INTEGER It is assumed that A is already upper
26               triangular in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI
27               are  normally  set by a previous call to SGEBAL; otherwise they
28               should be set to 1 and N respectively. See Further Details.
29
30       A       (input/output) REAL array, dimension (LDA,N)
31               On entry, the N-by-N general matrix to be  reduced.   On  exit,
32               the upper triangle and the first subdiagonal of A are overwrit‐
33               ten with the upper Hessenberg matrix H, and the elements  below
34               the  first  subdiagonal,  with  the  array  TAU,  represent the
35               orthogonal matrix Q as a product of elementary reflectors.  See
36               Further Details.  LDA     (input) INTEGER The leading dimension
37               of the array A.  LDA >= max(1,N).
38
39       TAU     (output) REAL array, dimension (N-1)
40               The scalar factors of the elementary  reflectors  (see  Further
41               Details). Elements 1:ILO-1 and IHI:N-1 of TAU are set to zero.
42
43       WORK    (workspace/output) REAL array, dimension (LWORK)
44               On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
45
46       LWORK   (input) INTEGER
47               The  length of the array WORK.  LWORK >= max(1,N).  For optimum
48               performance LWORK >= N*NB, where NB is the  optimal  blocksize.
49               If  LWORK  = -1, then a workspace query is assumed; the routine
50               only calculates the optimal size of  the  WORK  array,  returns
51               this  value  as the first entry of the WORK array, and no error
52               message related to LWORK is issued by XERBLA.
53
54       INFO    (output) INTEGER
55               = 0:  successful exit
56               < 0:  if INFO = -i, the i-th argument had an illegal value.
57

FURTHER DETAILS

59       The matrix Q is  represented  as  a  product  of  (ihi-ilo)  elementary
60       reflectors
61          Q = H(ilo) H(ilo+1) . . . H(ihi-1).
62       Each H(i) has the form
63          H(i) = I - tau * v * v'
64       where tau is a real scalar, and v is a real vector with
65       v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on exit
66       in A(i+2:ihi,i), and tau in TAU(i).
67       The contents of A are illustrated by the following example, with n = 7,
68       ilo = 2 and ihi = 6:
69       on entry,                        on exit,
70       ( a   a   a   a   a   a   a )    (  a   a   h   h   h   h   a ) (     a
71       a   a   a   a   a )    (      a   h   h   h   h   a ) (     a    a    a
72       a    a    a )    (      h   h   h   h   h   h ) (     a   a   a   a   a
73       a )    (      v2  h   h   h   h   h ) (     a   a   a    a    a    a  )
74       (       v2   v3   h    h    h    h ) (     a   a   a   a   a   a )    (
75       v2   v3   v4   h    h    h  )  (                           a   )      (
76       a  )  where  a denotes an element of the original matrix A, h denotes a
77       modified element of the upper Hessenberg matrix H, and  vi  denotes  an
78       element of the vector defining H(i).
79       This  file  is  a slight modification of LAPACK-3.0's SGEHRD subroutine
80       incorporating improvements proposed by Quintana-Orti and Van  de  Geijn
81       (2005).
82
83
84
85 LAPACK routine (version 3.2)    November 2008                       SGEHRD(1)
Impressum