naginterfaces.library.lapacklin.dsysvx¶
- naginterfaces.library.lapacklin.dsysvx(fact, uplo, a, af, ipiv, b)[source]¶
dsysvx
uses the diagonal pivoting factorization to compute the solution to a real system of linear equationswhere is an symmetric matrix and and are matrices. Error bounds on the solution and a condition estimate are also provided.
For full information please refer to the NAG Library document for f07mb
https://www.nag.com/numeric/nl/nagdoc_27.3/flhtml/f07/f07mbf.html
- Parameters
- factstr, length 1
Specifies whether or not the factorized form of the matrix has been supplied.
and contain the factorized form of the matrix . and will not be modified.
The matrix will be copied to and factorized.
- uplostr, length 1
If , the upper triangle of is stored.
If , the lower triangle of is stored.
- afloat, array-like, shape
The symmetric matrix .
- affloat, array-like, shape
If , contains the block diagonal matrix and the multipliers used to obtain the factor or from the factorization or as computed by
dsytrf()
.- ipivint, array-like, shape
If , contains details of the interchanges and the block structure of , as determined by
dsytrf()
.if , is a pivot block and the th row and column of were interchanged with the th row and column;
if and , is a pivot block and the th row and column of were interchanged with the th row and column;
if and , is a pivot block and the th row and column of were interchanged with the th row and column.
- bfloat, array-like, shape
The right-hand side matrix .
- Returns
- affloat, ndarray, shape
If , returns the block diagonal matrix and the multipliers used to obtain the factor or from the factorization or .
- ipivint, ndarray, shape
If , contains details of the interchanges and the block structure of , as determined by
dsytrf()
, as described above.- xfloat, ndarray, shape
If the function exits successfully or = + 1, the solution matrix .
- rcondfloat
The estimate of the reciprocal condition number of the matrix . If , the matrix may be exactly singular. This condition is indicated by in 1 … . Otherwise, if is less than the machine precision, the matrix is singular to working precision. This condition is indicated by = + 1.
- ferrfloat, ndarray, shape
If the function exits successfully or = + 1, an estimate of the forward error bound for each computed solution vector, such that where is the th column of the computed solution returned in the array and is the corresponding column of the exact solution . The estimate is as reliable as the estimate for , and is almost always a slight overestimate of the true error.
- berrfloat, ndarray, shape
If the function exits successfully or = + 1, an estimate of the component-wise relative backward error of each computed solution vector (i.e., the smallest relative change in any element of or that makes an exact solution).
- Raises
- NagValueError
- (errno )
On entry, error in parameter .
Constraint: or .
- (errno )
On entry, error in parameter .
Constraint: or .
- (errno )
On entry, error in parameter .
Constraint: .
- (errno )
On entry, error in parameter .
Constraint: .
- Warns
- NagAlgorithmicWarning
- (errno )
Element of the diagonal is exactly zero. The factorization has been completed, but the factor is exactly singular, so the solution and error bounds could not be computed. is returned.
- (errno )
is nonsingular, but 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 would suggest.
- Notes
dsysvx
performs the following steps:If , the diagonal pivoting method is used to factor . The form of the factorization is if or if , where (or ) is a product of permutation and unit upper (lower) triangular matrices, and is symmetric and block diagonal with and diagonal blocks.
If some , so that is exactly singular, then the function returns with . Otherwise, the factored form of is used to estimate the condition number of the matrix . If the reciprocal of the condition number is less than machine precision, = + 1 is returned as a warning, but the function still goes on to solve for and compute error bounds as described below.
The system of equations is solved for using the factored form of .
Iterative refinement is applied to improve the computed solution matrix and to calculate error bounds and backward error estimates for it.
- References
Anderson, E, Bai, Z, Bischof, C, Blackford, S, Demmel, J, Dongarra, J J, Du Croz, J J, Greenbaum, A, Hammarling, S, McKenney, A and Sorensen, D, 1999, LAPACK Users’ Guide, (3rd Edition), SIAM, Philadelphia, https://www.netlib.org/lapack/lug
Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore
Higham, N J, 2002, Accuracy and Stability of Numerical Algorithms, (2nd Edition), SIAM, Philadelphia