Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?poequb

Computes row and column scaling factors intended to equilibrate a symmetric (Hermitian) positive definite matrix and reduce its condition number.

Syntax

lapack_int LAPACKE_spoequb( int matrix_layout, lapack_int n, const float* a, lapack_int lda, float* s, float* scond, float* amax );

lapack_int LAPACKE_dpoequb( int matrix_layout, lapack_int n, const double* a, lapack_int lda, double* s, double* scond, double* amax );

lapack_int LAPACKE_cpoequb( int matrix_layout, lapack_int n, const lapack_complex_float* a, lapack_int lda, float* s, float* scond, float* amax );

lapack_int LAPACKE_zpoequb( int matrix_layout, 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 symmetric (Hermitian) positive-definite matrix A and reduce its condition number (with respect to the two-norm).

These factors are chosen so that the scaled matrix B with elements Bi,j=s[i-1]*Ai,j*s[j-1] has diagonal elements equal to 1. s[i - 1] is a power of two nearest to, but not exceeding 1/sqrt(Ai,i).

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).

n

The order of the matrix A; n 0.

a

Array: size max(1, lda*n) .

Contains the n-by-n symmetric or Hermitian positive definite matrix A whose scaling factors are to be computed. Only the diagonal elements of A are referenced.

lda

The leading dimension of a; lda max(1, m).

Output Parameters

s

Array, size (n).

If info = 0, the array s contains the scale factors for A.

scond

If info = 0, scond contains the ratio of the smallest s[i] to the largest s[i]. If scond 0.1, and amax is neither too large nor too small, it is not worth scaling by s.

amax

Absolute value of the largest element of the matrix A. If amax is very close to SMLNUM or BIGNUM, the matrix should be scaled.

Return Values

This function returns a value info.

If info = 0, the execution is successful.

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

If info = i, the i-th diagonal element of A is nonpositive.