2 Specification

3 Description

nag_zhpsv (f07pnc) uses the diagonal pivoting method to factor A as A=UDUH if uplo=Nag_Upper or A=LDLH if uplo=Nag_Lower, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, D is Hermitian and block diagonal with 1 by 1 and 2 by 2 diagonal blocks. The factored form of A is then used to solve the system of equations AX=B.

5 Arguments

1:
order – Nag_OrderTypeInput

On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by order=Nag_RowMajor. See Section 3.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.

Constraint:
order=Nag_RowMajor or Nag_ColMajor.

2:
uplo – Nag_UploTypeInput

On entry: if uplo=Nag_Upper, the upper triangle of A is stored.

If uplo=Nag_Lower, the lower triangle of A is stored.

Constraint:
uplo=Nag_Upper or Nag_Lower.

3:
n – IntegerInput

On entry:
n, the number of linear equations, i.e., the order of the matrix A.

Constraint:
n≥0.

4:
nrhs – IntegerInput

On entry:
r, the number of right-hand sides, i.e., the number of columns of the matrix B.

Constraint:
nrhs≥0.

5:
ap[dim] – ComplexInput/Output

Note: the dimension, dim, of the array ap
must be at least
max1,n×n+1/2.

On entry: the n by n Hermitian
matrix A, packed by rows or columns.

The storage of elements Aij depends on the order and uplo arguments as follows:

if order=Nag_ColMajor and uplo=Nag_Upper, Aij is stored in ap[j-1×j/2+i-1], for i≤j;

if order=Nag_ColMajor and uplo=Nag_Lower, Aij is stored in ap[2n-j×j-1/2+i-1], for i≥j;

if order=Nag_RowMajor and uplo=Nag_Upper, Aij is stored in ap[2n-i×i-1/2+j-1], for i≤j;

if order=Nag_RowMajor and uplo=Nag_Lower, Aij is stored in ap[i-1×i/2+j-1], for i≥j.

On exit: the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization
A=UDUH or
A=LDLH as computed by
nag_zhptrf (f07prc), stored as a packed triangular matrix in the same storage format as A.