hptri#

Functions

void chptri(
    const char*          uplo,
    const INT            n,
          c64*  restrict AP,
    const INT*  restrict ipiv,
          c64*  restrict work,
          INT*           info
);
void chptri(const char *uplo, const INT n, c64 *restrict AP, const INT *restrict ipiv, c64 *restrict work, INT *info)#

CHPTRI computes the inverse of a complex Hermitian indefinite matrix A in packed storage using the factorization A = U*D*U**H or A = L*D*L**H computed by CHPTRF.

Parameters

in
uplo

  • 'U': Upper triangular, form is A = U*D*U**H

  • 'L': Lower triangular, form is A = L*D*L**H

in
n

The order of the matrix A. n>=0.

inout
AP

Array of dimension n*(n+1)/2. On entry, the block diagonal matrix D and the multipliers used to obtain the factor U or L as computed by chptrf, stored as a packed triangular matrix. On exit, if info=0, the (Hermitian) inverse of the original matrix, stored as a packed triangular matrix. The j-th column of inv(A) is stored in the array AP as follows: if uplo='U', AP[i + j*(j+1)/2] = inv(A)(i,j) for 0<=i<=j; if uplo='L', AP[i + j*(2*n-j-1)/2] = inv(A)(i,j) for j<=i<=n-1.

in
ipiv

Array of dimension n. Details of the interchanges and the block structure of D as determined by chptrf.

out
work

Workspace array of dimension n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, D(i,i)=0; the matrix is singular and its inverse could not be computed.

Functions

void zhptri(
    const char*          uplo,
    const INT            n,
          c128* restrict AP,
    const INT*  restrict ipiv,
          c128* restrict work,
          INT*           info
);
void zhptri(const char *uplo, const INT n, c128 *restrict AP, const INT *restrict ipiv, c128 *restrict work, INT *info)#

ZHPTRI computes the inverse of a complex Hermitian indefinite matrix A in packed storage using the factorization A = U*D*U**H or A = L*D*L**H computed by ZHPTRF.

Parameters

in
uplo

  • 'U': Upper triangular, form is A = U*D*U**H

  • 'L': Lower triangular, form is A = L*D*L**H

in
n

The order of the matrix A. n>=0.

inout
AP

Array of dimension n*(n+1)/2. On entry, the block diagonal matrix D and the multipliers used to obtain the factor U or L as computed by zhptrf, stored as a packed triangular matrix. On exit, if info=0, the (Hermitian) inverse of the original matrix, stored as a packed triangular matrix. The j-th column of inv(A) is stored in the array AP as follows: if uplo='U', AP[i + j*(j+1)/2] = inv(A)(i,j) for 0<=i<=j; if uplo='L', AP[i + j*(2*n-j-1)/2] = inv(A)(i,j) for j<=i<=n-1.

in
ipiv

Array of dimension n. Details of the interchanges and the block structure of D as determined by zhptrf.

out
work

Workspace array of dimension n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

  • info>0: if info=i, D(i,i)=0; the matrix is singular and its inverse could not be computed.