EVESB

Computes the largest or smallest eigenvalues and the corresponding eigenvectors of a real symmetric matrix in band symmetric storage mode.

Required Arguments

NEVEC — Number of eigenvectors to be calculated. (Input)

A — Band symmetric matrix of order N. (Input)

NCODA — Number of codiagonals in A. (Input)

SMALL — Logical variable. (Input)
If .TRUE. , the smallest NEVEC eigenvectors are computed. If .FALSE. , the largest NEVEC eigenvectors are computed.

EVAL — Vector of length NEVEC containing the eigenvalues of A in decreasing order of magnitude. (Output)

EVEC — Real matrix of dimension N by NEVEC. (Output)
The J-th eigenvector, corresponding to EVAL(J), is stored in the J-th column. Each vector is normalized to have Euclidean length equal to the value one.

Optional Arguments

N — Order of the matrix A. (Input)
Default: N = SIZE (A,2).

LDA — Leading dimension of A exactly as specified in the dimension statement in the calling program. (Input)
Default: LDA = SIZE (A,1).

LDEVEC — Leading dimension of EVEC exactly as specified in the dimension statement in the calling program. (Input)
Default: LDEVEC = SIZE (EVEC,1).

FORTRAN 90 Interface

Generic: CALL EVESB (NEVEC, A, NCODA, SMALL, EVAL, EVEC,)

Specific: The specific interface names are S_EVESB and D_EVESB.

FORTRAN 77 Interface

Single: CALL EVESB (N, NEVEC, A, LDA, NCODA, SMALL, EVAL, EVEC, LDEVEC)

Double: The double precision name is DEVESB.

Description

Routine EVESB computes the largest or smallest eigenvalues and the corresponding eigenvectors of a real band symmetric matrix. Orthogonal similarity transformations are used to reduce the matrix to an equivalent symmetric tridiagonal matrix. The rational QR algorithm with Newton corrections is used to compute the extreme eigenvalues of this tridiagonal matrix. Inverse iteration and orthogonalization are used to compute the eigenvectors of the given band matrix. The reduction routine is based on the EISPACK routine BANDR; see Garbow et al. (1977). The QR routine is based on the EISPACK routine RATQR; see Smith et al. (1976). The inverse iteration and orthogonalization steps are based on EISPACK routine BANDV using the additional steps given in Hanson et al. (1990).

Comments

1. Workspace may be explicitly provided, if desired, by use of E4ESB/DE4ESB. The reference is:

CALL E4ESB (N, NEVEC, A, LDA, NCODA, SMALL, EVAL, EVEC, LDEVEC, ACOPY, WK, IWK)

The additional argument is:

ACOPY — Work array of length N(NCODA + 1).

WK — Work array of length N(2NCODA + 5).

IWK — Integer work array of length N.

2. Informational errors

 

Type

Code

Description

3

1

Inverse iteration did not converge. Eigenvector is not correct for the specified eigenvalue.

3

2

The eigenvectors have lost orthogonality.

3. The success of this routine can be checked using EPISB.

Example

The following example is given in Gregory and Karney (1969, page 75). The largest three eigenvalues and the corresponding eigenvectors of the matrix are computed and printed.

 

USE EVESB_INT

USE EPISB_INT

USE UMACH_INT

USE WRRRN_INT

 

IMPLICIT NONE

! Declare variables

INTEGER LDA, LDEVEC, N, NCODA, NEVEC

PARAMETER (N=6, NCODA=2, NEVEC=3, LDA=NCODA+1, LDEVEC=N)

!

INTEGER NOUT

REAL A(LDA,N), EVAL(NEVEC), EVEC(LDEVEC,NEVEC), PI

LOGICAL SMALL

! Define values of A:

! A = ( 5 -4 1 )

! ( -4 6 -4 1 )

! ( 1 -4 6 -4 1 )

! ( 1 -4 6 -4 1 )

! ( 1 -4 6 -4 )

! ( 1 -4 5 )

! Represented in band symmetric

! form this is:

! A = ( 0 0 1 1 1 1 )

! ( 0 -4 -4 -4 -4 -4 )

! ( 5 6 6 6 6 5 )

!

DATA A/0.0, 0.0, 5.0, 0.0, -4.0, 6.0, 1.0, -4.0, 6.0, 1.0, -4.0, &

6.0, 1.0, -4.0, 6.0, 1.0, -4.0, 5.0/

!

! Find the 3 largest eigenvalues

! and their eigenvectors.

SMALL = .FALSE.

CALL EVESB (NEVEC, A, NCODA, SMALL, EVAL, EVEC)

! Compute performance index

PI = EPISB(NEVEC,A,NCODA,EVAL,EVEC)

! Print results

CALL UMACH (2, NOUT)

CALL WRRRN ('EVAL', EVAL, 1, NEVEC, 1)

CALL WRRRN ('EVEC', EVEC)

WRITE (NOUT,'(/,A,F6.3)') ' Performance index = ', PI

END

Output

 

EVAL

1 2 3

14.45 10.54 5.98

 

EVEC

1 2 3

1 0.2319 -0.4179 0.5211

2 -0.4179 0.5211 -0.2319

3 0.5211 -0.2319 -0.4179

4 -0.5211 -0.2319 0.4179

5 0.4179 0.5211 0.2319

6 -0.2319 -0.4179 -0.5211

 

Performance index = 0.175