EVASB
Computes the largest or smallest eigenvalues of a real symmetric matrix in band symmetric storage mode.
Required Arguments
NEVAL — Number of eigenvalues to be computed. (Input)
A — Band symmetric matrix of order N. (Input)
NCODA — Number of codiagonals in A. (Input)
SMALL — Logical variable. (Input)
If .TRUE., the smallest NEVAL eigenvalues are computed. If .FALSE., the largest NEVAL eigenvalues are computed.
EVAL — Vector of length NEVAL containing the computed eigenvalues in decreasing order of magnitude. (Output)
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).
FORTRAN 90 Interface
Generic: CALL EVASB (NEVAL, A, NCODA, SMALL, EVAL [,…])
Specific: The specific interface names are S_EVASB and D_EVASB.
FORTRAN 77 Interface
Single: CALL EVASB (N, NEVAL, A, LDA, NCODA, SMALL, EVAL)
Double: The double precision name is DEVASB.
Description
Routine EVASB computes the largest or smallest eigenvalues 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.
The reduction routine is based on the EISPACK routine BANDR; see Garbow et al. (1978). The QR routine is based on the EISPACK routine RATQR; see Smith et al. (1976).
Comments
1. Workspace may be explicitly provided, if desired, by use of E3ASB/DE3ASB. The reference is:
CALL E3ASB (N, NEVAL, A, LDA, NCODA, SMALL, EVAL, ACOPY, WK)
The additional arguments are as follows:
ACOPY — Work array of length N(NCODA + 1). A and ACOPY may be the same, in which case the first N(NCODA + 1) elements of A will be destroyed.
WK — Work array of length 3N.
2. Informational error
Type |
Code |
Description |
3 |
1 |
The iteration for an eigenvalue failed to converge. The best estimate will be returned. |
Example
The following example is given in Gregory and Karney (1969, page 63). The smallest four eigenvalues of the matrix
are computed and printed.
USE EVASB_INT
USE WRRRN_INT
USE SSET_INT
IMPLICIT NONE
! Declare variables
INTEGER LDA, N, NCODA, NEVAL
PARAMETER (N=11, NCODA=3, NEVAL=4, LDA=NCODA+1)
!
REAL A(LDA,N), EVAL(NEVAL)
LOGICAL SMALL
! Set up matrix in band symmetric
! storage mode
CALL SSET (N, 6.0, A(4:,1), LDA)
CALL SSET (N-1, 3.0, A(3:,2), LDA)
CALL SSET (N-2, 1.0, A(2:,3), LDA)
CALL SSET (N-3, 1.0, A(1:,4), LDA)
CALL SSET (NCODA, 0.0, A(1:,1), 1)
CALL SSET (NCODA-1, 0.0, A(1:,2), 1)
CALL SSET (NCODA-2, 0.0, A(1:,3), 1)
A(4,1) = 5.0
A(4,N) = 5.0
A(3,2) = 2.0
A(3,N) = 2.0
! Find the 4 smallest eigenvalues
SMALL = .TRUE.
CALL EVASB (NEVAL, A, NCODA, SMALL, EVAL)
! Print results
CALL WRRRN ('EVAL', EVAL, 1, NEVAL, 1)
END
EVAL
1 2 3 4
4.000 3.172 1.804 0.522