?heequb
?heequb
Computes row and column scaling factors intended to equilibrate a Hermitian indefinite matrix and reduce its condition number.
Syntax
lapack_int LAPACKE_cheequb
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
const lapack_complex_float*
a
,
lapack_int
lda
,
float*
s
,
float*
scond
,
float*
amax
);
lapack_int LAPACKE_zheequb
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
const lapack_complex_double*
a
,
lapack_int
lda
,
double*
s
,
double*
scond
,
double*
amax
);
Include Files
- mkl.h
Description
The routine computes row and column scalings intended to equilibrate a Hermitian indefinite matrix
A
and reduce its condition number (with respect to the two-norm).The array .
These factors are chosen so that the scaled matrix =* has ones on the diagonal.
s
contains the scale factors, s
[i-1
] = 1/sqrt(ai,i
)B
with elements b
i
,j
s
[i-1]*a
i
,j
s
[j-1]This choice of
s
puts the condition number of B
within a factor n
of the smallest possible condition number over all possible diagonal scalings.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- uplo
- Must be'U'or'L'.Indicates whether the upper or lower triangular part ofAis stored:If, the arrayuplo='U'astores the upper triangular part of the matrixA.If, the arrayuplo='L'astores the lower triangular part of the matrixA.
- n
- The order of the matrixA;.n≥0
- a
- Arraya: sizemax(1,.lda*n)Contains then-by-nsymmetric indefinite matrixAwhose scaling factors are to be computed. Only the diagonal elements ofAare referenced.
- lda
- The leading dimension ofa;.lda≥max(1,m)
Output Parameters
- s
- Array, size (n).If, the arrayinfo= 0scontains the scale factors forA.
- scond
- If,info= 0scondcontains the ratio of the smallestto the largests[i]. Ifs[i], andscond≥0.1amaxis neither too large nor too small, it is not worth scaling bys.
- amax
- Absolute value of the largest element of the matrixA. Ifamaxis very close toSMLNUMorBIGNUM, the matrix should be scaled.
Return Values
This function returns a value
info
.If , the execution is successful.
info
= 0If , parameter
info
= -i
i
had an illegal value.If , the
info
= i
i
-th diagonal element of A
is nonpositive.