?pttrs

Solves a system of linear equations with a symmetric (Hermitian) positive-definite tridiagonal matrix using the factorization computed by ?pttrf.

Syntax

FORTRAN 77:

call spttrs( n, nrhs, d, e, b, ldb, info )

call dpttrs( n, nrhs, d, e, b, ldb, info )

call cpttrs( uplo, n, nrhs, d, e, b, ldb, info )

call zpttrs( uplo, n, nrhs, d, e, b, ldb, info )

FORTRAN 95:

call pttrs( d, e, b [,info] )

call pttrs( d, e, b [,uplo] [,info] )

C:

lapack_int LAPACKE_spttrs( int matrix_order, lapack_int n, lapack_int nrhs, const float* d, const float* e, float* b, lapack_int ldb );

lapack_int LAPACKE_dpttrs( int matrix_order, lapack_int n, lapack_int nrhs, const double* d, const double* e, double* b, lapack_int ldb );

lapack_int LAPACKE_cpttrs( int matrix_order, char uplo, lapack_int n, lapack_int nrhs, const float* d, const lapack_complex_float* e, lapack_complex_float* b, lapack_int ldb );

lapack_int LAPACKE_zpttrs( int matrix_order, char uplo, lapack_int n, lapack_int nrhs, const double* d, const lapack_complex_double* e, lapack_complex_double* b, lapack_int ldb );

Include Files

Description

The routine solves for X a system of linear equations A*X = B with a symmetric (Hermitian) positive-definite tridiagonal matrix A. Before calling this routine, call ?pttrf to compute the L*D*L' for real data and the L*D*L' or U'*D*U factorization of A for complex data.

Input Parameters

The data types are given for the Fortran interface. A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type definitions.

uplo

CHARACTER*1. Used for cpttrs/zpttrs only. Must be 'U' or 'L'.

Specifies whether the superdiagonal or the subdiagonal of the tridiagonal matrix A is stored and how A is factored:

If uplo = 'U', the array e stores the superdiagonal of A, and A is factored as U'*D*U.

If uplo = 'L', the array e stores the subdiagonal of A, and A is factored as L*D*L'.

n

INTEGER. The order of A; n 0.

nrhs

INTEGER. The number of right-hand sides, that is, the number of columns of the matrix B; nrhs 0.

d

REAL for spttrs, cpttrs

DOUBLE PRECISION for dpttrs, zpttrs.

Array, dimension (n). Contains the diagonal elements of the diagonal matrix D from the factorization computed by ?pttrf.

e, b

REAL for spttrs

DOUBLE PRECISION for dpttrs

COMPLEX for cpttrs

DOUBLE COMPLEX for zpttrs.

Arrays: e(n -1), b(ldb, nrhs).

The array e contains the (n - 1) off-diagonal elements of the unit bidiagonal factor U or L from the factorization computed by ?pttrf (see uplo).

The array b contains the matrix B whose columns are the right-hand sides for the systems of equations.

ldb

INTEGER. The leading dimension of b; ldb max(1, n).

Output Parameters

b

Overwritten by the solution matrix X.

info

INTEGER. If info=0, the execution is successful.

If info = -i, the i-th parameter had an illegal value.

Fortran 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see Fortran 95 Interface Conventions.

Specific details for the routine pttrs interface are as follows:

d

Holds the vector of length n.

e

Holds the vector of length (n-1).

b

Holds the matrix B of size (n, nrhs).

uplo

Used in complex flavors only. Must be 'U' or 'L'. The default value is 'U'.


Submit feedback on this help topic