gesvx#
Functions
-
void sgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, f32 *restrict A, const INT lda, f32 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f32 *restrict R, f32 *restrict C, f32 *restrict B, const INT ldb, f32 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, f32 *restrict work, INT *restrict iwork, INT *info)#
SGESVX uses the LU factorization to compute the solution to a real system of linear equations.
whereA * X = B
Ais ann-by-nmatrix and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:trans = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B trans = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B trans = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
If
fact='N'or'E', the LU decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = P * L * U
If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA.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.
If equilibration was used, the matrix X is premultiplied by
diag(C)(iftrans='N') ordiag(R)(iftrans='T'or'C').
Parameters
infact'F':AFandipivcontain the factored form ofA.'N': The matrixAwill be copied toAFand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
intrans'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose = Transpose)
innThe number of linear equations (order of
A).n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAArray of dimension (
lda,n). On entry, then-by-nmatrixA. On exit, if equilibration was done,Ais scaled.inldaThe leading dimension of
A.lda>=max(1,n).inoutAFArray of dimension (
ldaf,n). On entry (iffact='F'), contains the LU factors. On exit, contains the factors L and U.inldafThe leading dimension of
AF.ldaf>=max(1,n).inoutipivArray of dimension (
n). Pivot indices from factorization.inoutequedOn entry (if
fact='F'), specifies equilibration done. On exit, specifies the form of equilibration:'N': No equilibration'R': Row equilibration (A := diag(R) * A)'C': Column equilibration (A := A * diag(C))'B': Both (A := diag(R) * A * diag(C))
inoutRArray of dimension (
n). Row scale factors.inoutCArray of dimension (
n). Column scale factors.inoutBArray of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, if equilibration was done,Bis scaled.inldbThe leading dimension of
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Then-by-nrhssolution matrix X.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondReciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bound for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkWorkspace array of dimension (
4*n). On exit,work[0]contains the reciprocal pivot growth factor.outiworkInteger workspace array of dimension (
n).outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, U(i,i) is exactly zero (1-based). Ifinfo=n+1, U is nonsingular butrcond< machine precision.
void sgesvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
f32* restrict A,
const INT lda,
f32* restrict AF,
const INT ldaf,
INT* restrict ipiv,
char* equed,
f32* restrict R,
f32* restrict C,
f32* restrict B,
const INT ldb,
f32* restrict X,
const INT ldx,
f32* rcond,
f32* restrict ferr,
f32* restrict berr,
f32* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void dgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, f64 *restrict A, const INT lda, f64 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f64 *restrict R, f64 *restrict C, f64 *restrict B, const INT ldb, f64 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, f64 *restrict work, INT *restrict iwork, INT *info)#
DGESVX uses the LU factorization to compute the solution to a real system of linear equations.
whereA * X = B
Ais ann-by-nmatrix and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:trans = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B trans = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B trans = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
If
fact='N'or'E', the LU decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = P * L * U
If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA.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.
If equilibration was used, the matrix X is premultiplied by
diag(C)(iftrans='N') ordiag(R)(iftrans='T'or'C').
Parameters
infact'F':AFandipivcontain the factored form ofA.'N': The matrixAwill be copied toAFand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
intrans'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose = Transpose)
innThe number of linear equations (order of
A).n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAArray of dimension (
lda,n). On entry, then-by-nmatrixA. On exit, if equilibration was done,Ais scaled.inldaThe leading dimension of
A.lda>=max(1,n).inoutAFArray of dimension (
ldaf,n). On entry (iffact='F'), contains the LU factors. On exit, contains the factors L and U.inldafThe leading dimension of
AF.ldaf>=max(1,n).inoutipivArray of dimension (
n). Pivot indices from factorization.inoutequedOn entry (if
fact='F'), specifies equilibration done. On exit, specifies the form of equilibration:'N': No equilibration'R': Row equilibration (A := diag(R) * A)'C': Column equilibration (A := A * diag(C))'B': Both (A := diag(R) * A * diag(C))
inoutRArray of dimension (
n). Row scale factors.inoutCArray of dimension (
n). Column scale factors.inoutBArray of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, if equilibration was done,Bis scaled.inldbThe leading dimension of
B.ldb>=max(1,n).outXArray of dimension (
ldx,nrhs). Then-by-nrhssolution matrix X.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondReciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bound for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkWorkspace array of dimension (
4*n). On exit,work[0]contains the reciprocal pivot growth factor.outiworkInteger workspace array of dimension (
n).outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, U(i,i) is exactly zero (1-based). Ifinfo=n+1, U is nonsingular butrcond< machine precision.
void dgesvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
f64* restrict A,
const INT lda,
f64* restrict AF,
const INT ldaf,
INT* restrict ipiv,
char* equed,
f64* restrict R,
f64* restrict C,
f64* restrict B,
const INT ldb,
f64* restrict X,
const INT ldx,
f64* rcond,
f64* restrict ferr,
f64* restrict berr,
f64* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void cgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, c64 *restrict A, const INT lda, c64 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f32 *restrict R, f32 *restrict C, c64 *restrict B, const INT ldb, c64 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, c64 *restrict work, f32 *restrict rwork, INT *info)#
CGESVX uses the LU factorization to compute the solution to a complex system of linear equations.
whereA * X = B
Ais ann-by-nmatrix and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:trans = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B trans = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B trans = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
If
fact='N'or'E', the LU decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = P * L * U
If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA.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.
If equilibration was used, the matrix X is premultiplied by
diag(C)(iftrans='N') ordiag(R)(iftrans='T'or'C').
Parameters
infact'F':AFandipivcontain the factored form ofA.'N': The matrixAwill be copied toAFand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
intrans'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose)
innThe number of linear equations (order of
A).n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAComplex array of dimension (
lda,n). On entry, then-by-nmatrixA. On exit, if equilibration was done,Ais scaled.inldaThe leading dimension of
A.lda>=max(1,n).inoutAFComplex array of dimension (
ldaf,n). On entry (iffact='F'), contains the LU factors. On exit, contains the factors L and U.inldafThe leading dimension of
AF.ldaf>=max(1,n).inoutipivArray of dimension (
n). Pivot indices from factorization.inoutequedOn entry (if
fact='F'), specifies equilibration done. On exit, specifies the form of equilibration:'N': No equilibration'R': Row equilibration (A := diag(R) * A)'C': Column equilibration (A := A * diag(C))'B': Both (A := diag(R) * A * diag(C))
inoutRArray of dimension (
n). Row scale factors.inoutCArray of dimension (
n). Column scale factors.inoutBComplex array of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, if equilibration was done,Bis scaled.inldbThe leading dimension of
B.ldb>=max(1,n).outXComplex array of dimension (
ldx,nrhs). Then-by-nrhssolution matrix X.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondReciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bound for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkComplex workspace array of dimension (
2*n).outrworkReal workspace array of dimension (
max(1,2*n)). On exit,rwork[0]contains the reciprocal pivot growth factor.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, U(i,i) is exactly zero (1-based). Ifinfo=n+1, U is nonsingular butrcond< machine precision.
void cgesvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
c64* restrict A,
const INT lda,
c64* restrict AF,
const INT ldaf,
INT* restrict ipiv,
char* equed,
f32* restrict R,
f32* restrict C,
c64* restrict B,
const INT ldb,
c64* restrict X,
const INT ldx,
f32* rcond,
f32* restrict ferr,
f32* restrict berr,
c64* restrict work,
f32* restrict rwork,
INT* info
);
Functions
-
void zgesvx(const char *fact, const char *trans, const INT n, const INT nrhs, c128 *restrict A, const INT lda, c128 *restrict AF, const INT ldaf, INT *restrict ipiv, char *equed, f64 *restrict R, f64 *restrict C, c128 *restrict B, const INT ldb, c128 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, c128 *restrict work, f64 *restrict rwork, INT *info)#
ZGESVX uses the LU factorization to compute the solution to a complex system of linear equations.
whereA * X = B
Ais ann-by-nmatrix and X andBaren-by-nrhsmatrices.Error bounds on the solution and a condition estimate are also provided.
The following steps are performed:
If
fact='E', real scaling factors are computed to equilibrate the system:trans = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B trans = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B trans = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
If
fact='N'or'E', the LU decomposition is used to factor the matrixA(after equilibration iffact='E') as:A = P * L * U
If some
U(i,i)=0, so that U is exactly singular, then the routine returns withinfo=i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA.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.
If equilibration was used, the matrix X is premultiplied by
diag(C)(iftrans='N') ordiag(R)(iftrans='T'or'C').
Parameters
infact'F':AFandipivcontain the factored form ofA.'N': The matrixAwill be copied toAFand factored.'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored.
intrans'N': A * X = B (No transpose)'T': A**T * X = B (Transpose)'C': A**H * X = B (Conjugate transpose)
innThe number of linear equations (order of
A).n>=0.innrhsThe number of right hand sides.
nrhs>=0.inoutAComplex array of dimension (
lda,n). On entry, then-by-nmatrixA. On exit, if equilibration was done,Ais scaled.inldaThe leading dimension of
A.lda>=max(1,n).inoutAFComplex array of dimension (
ldaf,n). On entry (iffact='F'), contains the LU factors. On exit, contains the factors L and U.inldafThe leading dimension of
AF.ldaf>=max(1,n).inoutipivArray of dimension (
n). Pivot indices from factorization.inoutequedOn entry (if
fact='F'), specifies equilibration done. On exit, specifies the form of equilibration:'N': No equilibration'R': Row equilibration (A := diag(R) * A)'C': Column equilibration (A := A * diag(C))'B': Both (A := diag(R) * A * diag(C))
inoutRArray of dimension (
n). Row scale factors.inoutCArray of dimension (
n). Column scale factors.inoutBComplex array of dimension (
ldb,nrhs). On entry, then-by-nrhsright hand side matrixB. On exit, if equilibration was done,Bis scaled.inldbThe leading dimension of
B.ldb>=max(1,n).outXComplex array of dimension (
ldx,nrhs). Then-by-nrhssolution matrix X.inldxThe leading dimension of
X.ldx>=max(1,n).outrcondReciprocal condition number estimate.
outferrArray of dimension (
nrhs). Forward error bound for each solution vector.outberrArray of dimension (
nrhs). Backward error for each solution vector.outworkComplex workspace array of dimension (
2*n).outrworkReal workspace array of dimension (
max(1,2*n)). On exit,rwork[0]contains the reciprocal pivot growth factor.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, U(i,i) is exactly zero (1-based). Ifinfo=n+1, U is nonsingular butrcond< machine precision.
void zgesvx(
const char* fact,
const char* trans,
const INT n,
const INT nrhs,
c128* restrict A,
const INT lda,
c128* restrict AF,
const INT ldaf,
INT* restrict ipiv,
char* equed,
f64* restrict R,
f64* restrict C,
c128* restrict B,
const INT ldb,
c128* restrict X,
const INT ldx,
f64* rcond,
f64* restrict ferr,
f64* restrict berr,
c128* restrict work,
f64* restrict rwork,
INT* info
);