LSLTC
Solves a complex Toeplitz linear system.
Required Arguments
A — Complex vector of length 2N − 1 containing the first row of the coefficient matrix followed by its first column beginning with the second element. (Input)
See Comment 2.
B — Complex vector of length N containing the right-hand side of the linear system. (Input)
X — Complex vector of length N containing the solution of the linear system. (Output)
Optional Arguments
N — Order of the matrix represented by A. (Input)
Default: N = size (A,1).
IPATH — Integer flag. (Input)
IPATH = 1 means the system Ax = B is solved.
IPATH = 2 means the system ATx = B is solved.
Default: IPATH = 1.
FORTRAN 90 Interface
Generic: CALL LSLTC (A, B, X [, …])
Specific: The specific interface names are S_LSLTC and D_LSLTC.
FORTRAN 77 Interface
Single: CALL LSLTC (N, A, B, IPATH, X)
Double: The double precision name is DLSLTC.
Description
Toeplitz matrices have entries which are constant along each diagonal, for example,
The routine LSLTC is based on the routine TSLC in the TOEPLITZ package, see Arushanian et al. (1983). It is based on an algorithm of Trench (1964). This algorithm is also described by Golub and van Loan (1983), pages 125−133.
Comments
1. Workspace may be explicitly provided, if desired, by use of L2LTC/DL2LTC. The reference is:
CALL L2LTC (N, A, B, IPATH, X, WK)
The additional argument is
WK — Complex work vector of length 2N − 2.
2. Because of the special structure of Toeplitz matrices, the first row and the first column of a Toeplitz matrix completely characterize the matrix. Hence, only the elements
A(1, 1), …, A(1, N), A(2, 1), …, A(N, 1) need to be stored.
Example
A system of four complex linear equations is solved. Note that only the first row and column of the matrix A are entered.
USE LSLTC_INT
USE WRCRN_INT
! Declare variables
PARAMETER (N=4)
COMPLEX A(2*N-1), B(N), X(N)
! Set values for A and B
!
! A = ( 2+2i -3 1+4i 6-2i )
! ( i 2+2i -3 1+4i )
! ( 4+2i i 2+2i -3 )
! ( 3-4i 4+2i i 2+2i )
!
! B = ( 6+65i -29-16i 7+i -10+i )
!
DATA A/(2.0,2.0), (-3.0,0.0), (1.0,4.0), (6.0,-2.0), (0.0,1.0),&
(4.0,2.0), (3.0,-4.0)/
DATA B/(6.0,65.0), (-29.0,-16.0), (7.0,1.0), (-10.0,1.0)/
! Solve AX = B
CALL LSLTC (A, B, X)
! Print results
CALL WRCRN (’X’, X, 1, N, 1)
END
Output
X
1 2 3 4
(-2.000, 0.000) (-1.000,-5.000) ( 7.000, 2.000) ( 0.000, 4.000)