Function
NumCosmoMathlapack_dsysvx
Declaration [src]
gint
ncm_lapack_dsysvx (
gchar fact,
gchar uplo,
gint n,
gint nrhs,
gdouble* a,
gint lda,
gdouble* af,
gint ldaf,
gint* ipiv,
gdouble* b,
gint ldb,
gdouble* x,
gint ldx,
gdouble* rcond,
gdouble* ferr,
gdouble* berr,
gdouble* work,
gint lwork,
gint* iwork
)
Description [src]
Purpose
DSYSVX uses the diagonal pivoting factorization to compute the solution to a real system of linear equations A * X = B, where A is an N-by-N symmetric matrix and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided.
Description
The following steps are performed:
- If FACT = ‘N’, the diagonal pivoting method is used to factor A. The form of the factorization is
- A = U * D * U**T, if UPLO = ‘U’, or
- A = L * D * L**T, if UPLO = ‘L’, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
- If some D(i,i)=0, so that D is exactly singular, then the routine returns with INFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. If the reciprocal of the condition number is less than machine precision, INFO = N+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.
- The system of equations is solved for X using the factored form of A.
- Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
Parameters
fact-
Type:
gcharFACT is CHARACTER*1.
uplo-
Type:
gcharUPLO is CHARACTER*1.
n-
Type:
gintN is INTEGER.
nrhs-
Type:
gintNRHS is INTEGER.
a-
Type:
gdouble*A is DOUBLE PRECISION array, dimension (LDA,N).
The data is owned by the caller of the function. lda-
Type:
gintLDA is INTEGER.
af-
Type:
gdouble*AF is DOUBLE PRECISION array, dimension (LDAF,N).
The data is owned by the caller of the function. ldaf-
Type:
gintLDA is INTEGER.
ipiv-
Type:
gint*IPIV is INTEGER array, dimension (N).
The data is owned by the caller of the function. b-
Type:
gdouble*B is DOUBLE PRECISION array, dimension (LDB,NRHS).
The data is owned by the caller of the function. ldb-
Type:
gintLDB is INTEGER.
x-
Type:
gdouble*X is DOUBLE PRECISION array, dimension (LDX,NRHS).
The data is owned by the caller of the function. ldx-
Type:
gintLDX is INTEGER.
rcond-
Type:
gdouble*RCOND is DOUBLE PRECISION.
The data is owned by the caller of the function. ferr-
Type:
gdouble*FERR is DOUBLE PRECISION array, dimension (NRHS).
The data is owned by the caller of the function. berr-
Type:
gdouble*BERR is DOUBLE PRECISION array, dimension (NRHS).
The data is owned by the caller of the function. work-
Type:
gdouble*WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)).
The data is owned by the caller of the function. lwork-
Type:
gintLWORK is INTEGER.
iwork-
Type:
gint*IWORK is INTEGER array, dimension (N).
The data is owned by the caller of the function.
Return value
Type: gint
INFO is INTEGER - = 0: successful exit - < 0: if INFO = -i, the i-th argument had an illegal value - > 0: if INFO = i, and i is - <= N: D(i,i) is exactly zero. The factorization has been completed but the factor D is exactly singular, so the solution and error bounds could not be computed. RCOND = 0 is returned. - = N+1: D is nonsingular, but RCOND is less than machine precision, meaning that the matrix is singular to working precision. Nevertheless, the solution and error bounds are computed because there are a number of situations where the computed solution can be more accurate than the value of RCOND would suggest.