(
unsigned intx,
unsigned inty)
106 returnx < y ? x : y;
111 double*
a,
unsigned intlda_in,
double* w)
113 doubleoptimal_work_size;
114 charjobz = jobz_in, uplo = uplo_in;
116 dsyev_(&jobz, &uplo, &
n,
a, &lda, w, &optimal_work_size, &lwork, &
info);
119lwork = optimal_work_size;
120work =
malloc(lwork *
sizeof(
double));
124 dsyev_(&jobz, &uplo, &
n,
a, &lda, w, work, &lwork, &
info);
131 unsigned int r,
unsigned intc,
unsigned intnrhs_in,
132 double*
a,
unsigned intlda_in,
133 double*
b,
unsigned intldb_in)
136 chartrans = trans_in;
137 TLapackIntm =
r,
n= c, nrhs = nrhs_in, lda = lda_in, ldb = ldb_in,
138lwork = -1,
info= 0;
139 dgels_(&trans, &m, &
n, &nrhs,
a, &lda,
b, &ldb, &ows, &lwork, &
info);
143work =
malloc(lwork *
sizeof(
double));
147 dgels_(&trans, &m, &
n, &nrhs,
a, &lda,
b, &ldb, work, &lwork, &
info);
155 unsigned int r,
unsigned intc,
156 double*
a,
unsigned intlda_in,
double* s,
157 double* u,
unsigned intldu_in,
158 double* vt,
unsigned intldvt_in,
161 doubleoptimal_work_size;
162 charjobu = jobu_in, jobvt = jobvt_in;
163 TLapackIntm =
r,
n= c, lda = lda_in, ldu = ldu_in, ldvt = ldvt_in,
164lwork = -1,
info= 0;
165 dgesvd_(&jobu, &jobvt, &m, &
n,
a, &lda, s, u, &ldu, vt, &ldvt,
166&optimal_work_size, &lwork, &
info);
169lwork = optimal_work_size;
170work =
malloc(lwork *
sizeof(
double));
174 dgesvd_(&jobu, &jobvt, &m, &
n,
a, &lda, s, u, &ldu, vt, &ldvt,
175work, &lwork, &
info);
176 if(superb !=
NULL) {
177memcpy(superb, work + 1, (
s_Min(
r, c) - 1) *
sizeof(
double));
static const int kNcbiLapackMemoryError
int NCBI_SymmetricEigens(enum EEigensWanted jobz_in, enum EMatrixTriangle uplo_in, unsigned int n_in, double *a, unsigned int lda_in, double *w)
Compute the eigenvalues, and optionally also the eigenvectors, of a symmetric matrix.
ESingularVectorDetailsWanted
int NCBI_SingularValueDecomposition(enum ESingularVectorDetailsWanted jobu_in, enum ESingularVectorDetailsWanted jobvt_in, unsigned int r, unsigned int c, double *a, unsigned int lda_in, double *s, double *u, unsigned int ldu_in, double *vt, unsigned int ldvt_in, double *superb)
Compute the singular value decomposition of a matrix.
int NCBI_LinearSolution(enum EMaybeTransposed trans_in, unsigned int r, unsigned int c, unsigned int nrhs_in, double *a, unsigned int lda_in, double *b, unsigned int ldb_in)
Find the least-squares solution of an overdetermined linear system, or the minimum-norm solution of a...
TLapackInt dgels_(char *trans, TLapackInt *m, TLapackInt *n, TLapackInt *nrhs, double *a, TLapackInt *lda, double *b, TLapackInt *ldb, double *work, TLapackInt *lwork, TLapackInt *info)
TLapackInt dsyev_(char *jobz, char *uplo, TLapackInt *n, double *a, TLapackInt *lda, double *w, double *work, TLapackInt *lwork, TLapackInt *info)
static unsigned int s_Min(unsigned int x, unsigned int y)
TLapackInt dgesvd_(char *jobu, char *jobvt, TLapackInt *m, TLapackInt *n, double *a, TLapackInt *lda, double *s, double *u, TLapackInt *ldu, double *vt, TLapackInt *ldvt, double *work, TLapackInt *lwork, TLapackInt *info)
Front end for a platform-specific configuration summary.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4