Top | ![]() |
![]() |
![]() |
![]() |
Functions
NcmLapackWS * | ncm_lapack_ws_new () |
NcmLapackWS * | ncm_lapack_ws_dup () |
void | ncm_lapack_ws_free () |
void | ncm_lapack_ws_clear () |
gint | ncm_lapack_dptsv () |
gint | ncm_lapack_dpotrf () |
gint | ncm_lapack_dpotri () |
gint | ncm_lapack_dpotrs () |
gint | ncm_lapack_dposv () |
gint | ncm_lapack_dsytrf () |
gint | ncm_lapack_dsytrs () |
gint | ncm_lapack_dsytri () |
gint | ncm_lapack_dsysvx () |
gint | ncm_lapack_dsysvxx () |
gint | ncm_lapack_dsyevr () |
gint | ncm_lapack_dsyevd () |
gint | ncm_lapack_dgeev () |
gint | ncm_lapack_dgeevx () |
gint | ncm_lapack_dgeqrf () |
gint | ncm_lapack_dgerqf () |
gint | ncm_lapack_dgeqlf () |
gint | ncm_lapack_dgelqf () |
GArray * | ncm_lapack_dggglm_alloc () |
gint | ncm_lapack_dggglm_run () |
#define | NCM_LAPACK_CHECK_INFO() |
Description
This object is dedicated to encapsulate functions from LAPACK choosing the most suitable backend.
Priority order: (1) LAPACK and (2) GSL. It no longer tries to use clapack or lapacke, it is faster and simpler to stick to fortran's lapack.
The description of each function follows its respective LAPACK documentation.
Functions
ncm_lapack_ws_dup ()
NcmLapackWS *
ncm_lapack_ws_dup (NcmLapackWS *ws
);
Duplicates a Lapack workspace object.
ncm_lapack_ws_clear ()
void
ncm_lapack_ws_clear (NcmLapackWS **ws
);
Clears a Lapack workspace object.
ncm_lapack_dptsv ()
gint ncm_lapack_dptsv (gdouble *d
,gdouble *e
,gdouble *b
,gdouble *x
,gint n
);
This function computes the solution to a real system of linear equations
$A*X = B$ (B = b
), where $A$ is an N-by-N (N = n
) symmetric positive definite tridiagonal
matrix, and $X$ and $B$ are N-by-NRHS (NRHS = 1) matrices.
$A$ is factored as $A = L*D*L^T$, and the factored form of $A$ is then used to solve the system of equations.
ncm_lapack_dpotrf ()
gint ncm_lapack_dpotrf (gchar uplo
,gint n
,gdouble *a
,gint lda
);
This function computes the Cholesky factorization of a real symmetric
positive definite matrix a
.
The factorization has the form
$A = U^T * U$, if uplo
= 'U', or
$A = L * L^T$, if uplo
= 'L',
where A = a
, $U$ is an upper triangular matrix and $L$ is lower triangular.
ncm_lapack_dpotri ()
gint ncm_lapack_dpotri (gchar uplo
,gint n
,gdouble *a
,gint lda
);
This function computes the inverse of a real symmetric positive
definite matrix a
= A using the Cholesky factorization
$A = U^T*U$ or $A = L*L^T$ computed by ncm_lapack_dpotrf()
.
ncm_lapack_dpotrs ()
gint ncm_lapack_dpotrs (gchar uplo
,gint n
,gint nrhs
,gdouble *a
,gint lda
,gdouble *b
,gint ldb
);
This function computes the solution of $A X = B$ for a real symmetric positive
definite matrix a
= A using the Cholesky factorization $A = U^T*U$ or $A = L*L^T$
already performed by ncm_lapack_dpotrf()
.
On entry b
contain the vectors $B$ and on exit b
contain the solutions if the return
is 0.
Parameters
uplo |
'U' upper triangle of |
|
n |
The order of the matrix |
|
nrhs |
Number of right-hand-side vectors to solve |
|
a |
array of doubles with dimension ( |
|
lda |
The leading dimension of the array |
|
b |
array of doubles with dimension ( |
|
ldb |
The leading dimension of the array |
ncm_lapack_dposv ()
gint ncm_lapack_dposv (gchar uplo
,gint n
,gint nrhs
,gdouble *a
,gint lda
,gdouble *b
,gint ldb
);
This function computes the solution of $A X = B$ for a real symmetric positive
definite matrix a
= A using the Cholesky factorization $A = U^T*U$ or $A = L*L^T$.
On entry b
contain the vectors $B$ and on exit b
contain the solutions if the return
is 0.
Parameters
uplo |
'U' upper triangle of |
|
n |
The order of the matrix |
|
nrhs |
Number of right-hand-side vectors to solve |
|
a |
array of doubles with dimension ( |
|
lda |
The leading dimension of the array |
|
b |
array of doubles with dimension ( |
|
ldb |
The leading dimension of the array |
ncm_lapack_dsytrf ()
gint ncm_lapack_dsytrf (gchar uplo
,gint n
,gdouble *a
,gint lda
,gint *ipiv
,NcmLapackWS *ws
);
This function computes the factorization of a real symmetric
matrix a
, using the Bunch-Kaufman diagonal pivoting method.
ncm_lapack_dsytrs ()
gint ncm_lapack_dsytrs (gchar uplo
,gint n
,gint nrhs
,gdouble *a
,gint lda
,gint *ipiv
,gdouble *b
,gint ldb
);
This function computes the solution of $A X = B$ for a real symmetric positive
definite matrix a
= A using the Cholesky factorization $A = U^T*U$ or $A = L*L^T$
already performed by ncm_lapack_dpotrf()
.
On entry b
contain the vectors $B$ and on exit b
contain the solutions if the return
is 0.
Parameters
uplo |
'U' upper triangle of |
|
n |
The order of the matrix |
|
nrhs |
Number of right-hand-side vectors to solve |
|
a |
array of doubles with dimension ( |
|
lda |
The leading dimension of the array |
|
ipiv |
Information about decomposition swaps and blocks |
|
b |
array of doubles with dimension ( |
|
ldb |
The leading dimension of the array |
ncm_lapack_dsytri ()
gint ncm_lapack_dsytri (gchar uplo
,gint n
,gdouble *a
,gint lda
,gint *ipiv
,NcmLapackWS *ws
);
This function compute the inverse of a real symmetric indefinite matrix a
using
the factorization a
= U*D*U**T or a
= L*D*L**T computed by ncm_lapack_dsytrf()
.
ncm_lapack_dsysvx ()
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
);
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 |
FACT is CHARACTER*1 Specifies whether or not the factored form of the matrix A is supplied on entry, and if not, whether the matrix A should be equilibrated before it is factored.
|
|
uplo |
UPLO is CHARACTER*1
|
|
n |
N is INTEGER The number of linear equations, i.e., the order of the matrix A. N >= 0. |
|
nrhs |
NRHS is INTEGER The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0. |
|
a |
A is DOUBLE PRECISION array, dimension (LDA,N) The symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. |
|
lda |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N). |
|
af |
AF is DOUBLE PRECISION array, dimension (LDAF,N)
|
|
ldaf |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N). |
|
ipiv |
IPIV is INTEGER array, dimension (N) If FACT = 'F', then IPIV is an input argument and on entry contains details of the interchanges and the block structure of D, as determined by DSYTRF. If IPIV(k) > 0, then rows and columns k and IPIV(k) were interchanged and D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. If FACT = 'N', then IPIV is an output argument and on exit contains details of the interchanges and the block structure of D, as determined by DSYTRF. |
|
b |
B is DOUBLE PRECISION array, dimension (LDB,NRHS) On entry, the N-by-NRHS right hand side matrix B. On exit,
|
|
ldb |
LDB is INTEGER The leading dimension of the array B. LDB >= max(1,N). |
|
x |
X is DOUBLE PRECISION array, dimension (LDX,NRHS) If INFO = 0, the N-by-NRHS solution matrix X to the original system of equations. Note that A and B are modified on exit if EQUED .ne. 'N', and the solution to the equilibrated system is inv(diag(S))*X. |
|
ldx |
LDX is INTEGER The leading dimension of the array X. LDX >= max(1,N). |
|
rcond |
RCOND is DOUBLE PRECISION Reciprocal scaled condition number. This is an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if done). If this is less than the machine precision (in particular, if it is zero), the matrix is singular to working precision. Note that the error may still be small even if this number is very small and the matrix appears ill- conditioned. |
|
ferr |
FERR is DOUBLE PRECISION array, dimension (NRHS) The estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). If XTRUE is the true solution corresponding to X(j), FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). The estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error.. |
|
berr |
BERR is DOUBLE PRECISION array, dimension (NRHS) Componentwise relative backward error. This is the componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution). |
|
work |
WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK(1) returns the optimal LWORK. |
|
lwork |
LWORK is INTEGER The length of WORK. LWORK >= max(1,3*N), and for best performance, when FACT = 'N', LWORK >= max(1,3*N,N*NB), where NB is the optimal blocksize for DSYTRF. If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. |
|
iwork |
IWORK is INTEGER array, dimension (N) |
Returns
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.
ncm_lapack_dsysvxx ()
gint ncm_lapack_dsysvxx (gchar fact
,gchar uplo
,gint n
,gint nrhs
,gdouble *a
,gint lda
,gdouble *af
,gint ldaf
,gint *ipiv
,gchar *equed
,gdouble *s
,gdouble *b
,gint ldb
,gdouble *x
,gint ldx
,gdouble *rcond
,gdouble *rpvgrw
,gdouble *berr
,const gint n_err_bnds
,gdouble *err_bnds_norm
,gdouble *err_bnds_comp
,const gint nparams
,gdouble *params
,gdouble *work
,gint *iwork
);
Purpose
DSYSVXX uses the diagonal pivoting factorization to compute the solution to a double precision 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.
If requested, both normwise and maximum componentwise error bounds are returned. DSYSVXX will return a solution with a tiny guaranteed error (O(eps) where eps is the working machine precision) unless the matrix is very ill-conditioned, in which case a warning is returned. Relevant condition numbers also are calculated and returned.
DSYSVXX accepts user-provided factorizations and equilibration factors; see the definitions of the FACT and EQUED options. Solving with refinement and using a factorization from a previous DSYSVXX call will also produce a solution with either O(eps) errors or warnings, but we cannot make that claim for general user-provided factorizations and equilibration factors if they differ from what DSYSVXX would itself produce.
Description
The following steps are performed:
-
If FACT = 'E', double precision scaling factors are computed to equilibrate the system:
diag(S)*A*diag(S) *inv(diag(S))*X = diag(S)*B Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
-
If FACT = 'N' or 'E', the LU decomposition is used to factor the matrix A (after equilibration if FACT = 'E') as
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 (see argument RCOND). If the reciprocal of the condition number is less than machine precision, 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.
By default (unless PARAMS(LA_LINRX_ITREF_I) is set to zero), the routine will use iterative refinement to try to get a small error and error bounds. Refinement calculates the residual to at least twice the working precision.
If equilibration was used, the matrix X is premultiplied by diag(R) so that it solves the original system before equilibration.
Some optional parameters are bundled in the PARAMS array. These settings determine how refinement is performed, but often the defaults are acceptable. If the defaults are acceptable, users can pass NPARAMS = 0 which prevents the source code from accessing the PARAMS argument.
Parameters
fact |
FACT is CHARACTER*1 Specifies whether or not the factored form of the matrix A is supplied on entry, and if not, whether the matrix A should be equilibrated before it is factored.
|
|
uplo |
UPLO is CHARACTER*1
|
|
n |
N is INTEGER The number of linear equations, i.e., the order of the matrix A. N >= 0. |
|
nrhs |
NRHS is INTEGER The number of right hand sides, i.e., the number of columns of the matrices B and X. NRHS >= 0. |
|
a |
A is DOUBLE PRECISION array, dimension (LDA,N) The symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by diag(S)*A*diag(S). |
|
lda |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N). |
|
af |
AF is DOUBLE PRECISION array, dimension (LDAF,N)
|
|
ldaf |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N). |
|
ipiv |
IPIV is INTEGER array, dimension (N) If FACT = 'F', then IPIV is an input argument and on entry contains details of the interchanges and the block structure of D, as determined by DSYTRF. If IPIV(k) > 0, then rows and columns k and IPIV(k) were interchanged and D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. If FACT = 'N', then IPIV is an output argument and on exit contains details of the interchanges and the block structure of D, as determined by DSYTRF. |
|
equed |
EQUED is CHARACTER*1 Specifies the form of equilibration that was done.
|
|
s |
S is DOUBLE PRECISION array, dimension (N) The scale factors for A. If EQUED = 'Y', A is multiplied on the left and right by diag(S). S is an input argument if FACT = 'F'; otherwise, S is an output argument. If FACT = 'F' and EQUED = 'Y', each element of S must be positive. If S is output, each element of S is a power of the radix. If S is input, each element of S should be a power of the radix to ensure a reliable solution and error estimates. Scaling by powers of the radix does not cause rounding errors unless the result underflows or overflows. Rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, producing error estimates that may not be reliable. |
|
b |
B is DOUBLE PRECISION array, dimension (LDB,NRHS) On entry, the N-by-NRHS right hand side matrix B. On exit,
|
|
ldb |
LDB is INTEGER The leading dimension of the array B. LDB >= max(1,N). |
|
x |
X is DOUBLE PRECISION array, dimension (LDX,NRHS) If INFO = 0, the N-by-NRHS solution matrix X to the original system of equations. Note that A and B are modified on exit if EQUED .ne. 'N', and the solution to the equilibrated system is inv(diag(S))*X. |
|
ldx |
LDX is INTEGER The leading dimension of the array X. LDX >= max(1,N). |
|
rcond |
RCOND is DOUBLE PRECISION Reciprocal scaled condition number. This is an estimate of the reciprocal Skeel condition number of the matrix A after equilibration (if done). If this is less than the machine precision (in particular, if it is zero), the matrix is singular to working precision. Note that the error may still be small even if this number is very small and the matrix appears ill- conditioned. |
|
rpvgrw |
RPVGRW is DOUBLE PRECISION Reciprocal pivot growth. On exit, this contains the reciprocal pivot growth factor norm(A)/norm(U). The "max absolute element" norm is used. If this is much less than 1, then the stability of the LU factorization of the (equilibrated) matrix A could be poor. This also means that the solution X, estimated condition numbers, and error bounds could be unreliable. If factorization fails with 0<INFO<=N, then this contains the reciprocal pivot growth factor for the leading INFO columns of A. |
|
berr |
BERR is DOUBLE PRECISION array, dimension (NRHS) Componentwise relative backward error. This is the componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution). |
|
n_err_bnds |
N_ERR_BNDS is INTEGER Number of error bounds to return for each right hand side and each type (normwise or componentwise). See ERR_BNDS_NORM and ERR_BNDS_COMP below. |
|
err_bnds_norm |
ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) For each right-hand side, this array contains information about various error bounds and condition numbers corresponding to the normwise relative error, which is defined as follows: Normwise relative error in the ith solution vector: max_j (abs(XTRUE(j,i) - X(j,i))) ------------------------------ max_j abs(X(j,i)) The array is indexed by the type of error information as described below. There currently are up to three pieces of information returned. The first index in ERR_BNDS_NORM(i,:) corresponds to the ith right-hand side. The second index in ERR_BNDS_NORM(:,err) contains the following three fields:
|
|
err_bnds_comp |
ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) For each right-hand side, this array contains information about various error bounds and condition numbers corresponding to the componentwise relative error, which is defined as follows: Componentwise relative error in the ith solution vector: abs(XTRUE(j,i) - X(j,i)) max_j ---------------------- abs(X(j,i)) The array is indexed by the right-hand side i (on which the componentwise relative error depends), and the type of error information as described below. There currently are up to three pieces of information returned for each right-hand side. If componentwise accuracy is not requested (PARAMS(3) = 0.0), then ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most the first (:,N_ERR_BNDS) entries are returned. The first index in ERR_BNDS_COMP(i,:) corresponds to the ith right-hand side. The second index in ERR_BNDS_COMP(:,err) contains the following three fields:
|
|
nparams |
NPARAMS is INTEGER Specifies the number of parameters set in PARAMS. If .LE. 0, the PARAMS array is never referenced and default values are used. |
|
params |
PARAMS is DOUBLE PRECISION array, dimension (NPARAMS) Specifies algorithm parameters. If an entry is .LT. 0.0, then that entry will be filled with default value used for that parameter. Only positions up to NPARAMS are accessed; defaults are used for higher-numbered parameters.
|
|
work |
WORK is DOUBLE PRECISION array, dimension (4*N) |
|
iwork |
IWORK is INTEGER array, dimension (N) |
Returns
INFO is INTEGER
= 0: Successful exit. The solution to every right-hand side is guaranteed.
< 0: If INFO = -i, the i-th argument had an illegal value
> 0 and <= N: U(INFO,INFO) is exactly zero. The factorization has been completed, but the factor U is exactly singular, so the solution and error bounds could not be computed. RCOND = 0 is returned.
= N+J: The solution corresponding to the Jth right-hand side is not guaranteed. The solutions corresponding to other right- hand sides K with K > J may not be guaranteed as well, but only the first such right-hand side is reported. If a small componentwise error is not requested (PARAMS(3) = 0.0) then the Jth right-hand side is the first with a normwise error bound that is not guaranteed (the smallest J such that ERR_BNDS_NORM(J,1) = 0.0). By default (PARAMS(3) = 1.0) the Jth right-hand side is the first with either a normwise or componentwise error bound that is not guaranteed (the smallest J such that either ERR_BNDS_NORM(J,1) = 0.0 or ERR_BNDS_COMP(J,1) = 0.0). See the definition of ERR_BNDS_NORM(:,1) and ERR_BNDS_COMP(:,1). To get information about all of the right-hand sides check ERR_BNDS_NORM or ERR_BNDS_COMP.
ncm_lapack_dsyevr ()
gint ncm_lapack_dsyevr (gchar jobz
,gchar range
,gchar uplo
,gint n
,gdouble *a
,gint lda
,gdouble vl
,gdouble vu
,gint il
,gint iu
,gdouble abstol
,gint *m
,gdouble *w
,gdouble *z
,gint ldz
,gint *isuppz
,NcmLapackWS *ws
);
FIXME
ncm_lapack_dsyevd ()
gint ncm_lapack_dsyevd (gchar jobz
,gchar uplo
,gint n
,gdouble *a
,gint lda
,gdouble *w
,NcmLapackWS *ws
);
FIXME
ncm_lapack_dgeev ()
gint ncm_lapack_dgeev (gchar jobvl
,gchar jobvr
,gint n
,gdouble *a
,gint lda
,gdouble *wr
,gdouble *wi
,gdouble *vl
,gint ldvl
,gdouble *vr
,gint ldvr
,gdouble *work
,gint lwork
);
This function computes the eigensystem for a real matrix a
= A.
Calling this function with lwork == -1 computed the ideal lwork
in work
[0].
Parameters
jobvl |
|
|
jobvr |
|
|
n |
The order of the matrix |
|
a |
array of doubles with dimension ( |
|
lda |
The leading dimension of the array |
|
wr |
contain the real part of the computed eigenvalues |
|
wi |
contain the imaginary part of the computed eigenvalues |
|
vl |
if |
|
ldvl |
the leading dimension of the array |
|
vr |
if |
|
ldvr |
the leading dimension of the array |
|
work |
work area, must have |
|
lwork |
work area size |
ncm_lapack_dgeevx ()
gint ncm_lapack_dgeevx (gchar balanc
,gchar jobvl
,gchar jobvr
,gchar sense
,gint n
,gdouble *a
,gint lda
,gdouble *wr
,gdouble *wi
,gdouble *vl
,gint ldvl
,gdouble *vr
,gint ldvr
,gint *ilo
,gint *ihi
,gdouble *scale
,gdouble *abnrm
,gdouble *rconde
,gdouble *rcondv
,gdouble *work
,gint lwork
,gint *iwork
);
This function computes the eigensystem for a real matrix a
= A.
Calling this function with lwork == -1 computed the ideal lwork
in work
[0].
Parameters
balanc |
FIXME |
|
jobvl |
|
|
jobvr |
|
|
sense |
FIXME |
|
n |
The order of the matrix |
|
a |
array of doubles with dimension ( |
|
lda |
The leading dimension of the array |
|
wr |
contain the real part of the computed eigenvalues |
|
wi |
contain the imaginary part of the computed eigenvalues |
|
vl |
if |
|
ldvl |
the leading dimension of the array |
|
vr |
if |
|
ldvr |
the leading dimension of the array |
|
ilo |
FIXME |
|
ihi |
FIXME |
|
scale |
FIXME |
|
abnrm |
FIXME |
|
rconde |
FIXME |
|
rcondv |
FIXME |
|
work |
work area, must have |
|
lwork |
work area size |
|
iwork |
FIXME |
ncm_lapack_dgeqrf ()
gint ncm_lapack_dgeqrf (gint m
,gint n
,gdouble *a
,gint lda
,gdouble *tau
,NcmLapackWS *ws
);
DGEQRF computes a QR factorization of a real M-by-N matrix A: A = Q * R.
Parameters
m |
M is INTEGER The number of rows of the matrix A. M >= 0. |
|
n |
N is INTEGER The number of columns of the matrix A. N >= 0. |
|
a |
A is DOUBLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and above the diagonal of the array contain the min(M,N)-by-N upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors (see Further Details). |
|
lda |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M). |
|
tau |
TAU is DOUBLE PRECISION array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). |
|
ws |
ncm_lapack_dgerqf ()
gint ncm_lapack_dgerqf (gint m
,gint n
,gdouble *a
,gint lda
,gdouble *tau
,NcmLapackWS *ws
);
DGERQF computes a RQ factorization of a real M-by-N matrix A: A = R * Q.
Parameters
m |
M is INTEGER The number of rows of the matrix A. M >= 0. |
|
n |
N is INTEGER The number of columns of the matrix A. N >= 0. |
|
a |
A is DOUBLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and above the diagonal of the array contain the min(M,N)-by-N upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors (see Further Details). |
|
lda |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M). |
|
tau |
TAU is DOUBLE PRECISION array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). |
|
ws |
ncm_lapack_dgeqlf ()
gint ncm_lapack_dgeqlf (gint m
,gint n
,gdouble *a
,gint lda
,gdouble *tau
,NcmLapackWS *ws
);
DGEQLF computes a QL factorization of a real M-by-N matrix A: A = Q * L.
Parameters
m |
M is INTEGER The number of rows of the matrix A. M >= 0. |
|
n |
N is INTEGER The number of columns of the matrix A. N >= 0. |
|
a |
A is DOUBLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and above the diagonal of the array contain the min(M,N)-by-N upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors (see Further Details). |
|
lda |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M). |
|
tau |
TAU is DOUBLE PRECISION array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). |
|
ws |
ncm_lapack_dgelqf ()
gint ncm_lapack_dgelqf (gint m
,gint n
,gdouble *a
,gint lda
,gdouble *tau
,NcmLapackWS *ws
);
DGELQF computes a LQ factorization of a real M-by-N matrix A: A = L * Q.
Parameters
m |
M is INTEGER The number of rows of the matrix A. M >= 0. |
|
n |
N is INTEGER The number of columns of the matrix A. N >= 0. |
|
a |
A is DOUBLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, the elements on and above the diagonal of the array contain the min(M,N)-by-N upper trapezoidal matrix R (R is upper triangular if m >= n); the elements below the diagonal, with the array TAU, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors (see Further Details). |
|
lda |
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,M). |
|
tau |
TAU is DOUBLE PRECISION array, dimension (min(M,N)) The scalar factors of the elementary reflectors (see Further Details). |
|
ws |
ncm_lapack_dggglm_alloc ()
GArray * ncm_lapack_dggglm_alloc (NcmMatrix *L
,NcmMatrix *X
,NcmVector *p
,NcmVector *d
,NcmVector *y
);
Calculates and allocs memory to solve the system determined by the parameters.
This function is expect the matrix X
and L
to be row-major.
ncm_lapack_dggglm_run ()
gint ncm_lapack_dggglm_run (GArray *ws
,NcmMatrix *L
,NcmMatrix *X
,NcmVector *p
,NcmVector *d
,NcmVector *y
);
Runs the dggglm function using the workspace ws
.
This function is expect the matrix X
and L
to be row-major.