lalsd#
Functions
-
void slalsd(const char *uplo, const INT smlsiz, const INT n, const INT nrhs, f32 *restrict D, f32 *restrict E, f32 *restrict B, const INT ldb, const f32 rcond, INT *rank, f32 *restrict work, INT *restrict iwork, INT *info)#
SLALSD uses the singular value decomposition of A to solve the least squares problem of finding X to minimize the Euclidean norm of each column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-by-NRHS.
The solution X overwrites B.
The singular values of A smaller than RCOND times the largest singular value are treated as zero in solving the least squares problem; in this case a minimum norm solution is returned. The actual singular values are returned in D in ascending order.
Parameters
inuplo= ‘U’: D and E define an upper bidiagonal matrix. = ‘L’: D and E define a lower bidiagonal matrix.
insmlsizThe maximum size of subproblems at the bottom of the tree.
innThe dimension of the bidiagonal matrix. n >= 0.
innrhsThe number of columns of B. nrhs >= 1.
inoutDArray of dimension n. On entry, the main diagonal. On exit, the singular values in ascending order.
inoutEArray of dimension n-1. On entry, the super-diagonal. On exit, E has been destroyed.
inoutBArray of dimension (ldb, nrhs). On input, the right hand sides. On output, the solution X.
inldbThe leading dimension of B. ldb >= max(1, n).
inrcondThe singular values less than or equal to rcond*max(S) are treated as zero. If rcond < 0, machine precision is used.
outrankThe number of singular values > rcond*max(S).
outworkArray of dimension at least (9*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs + (smlsiz+1)^2).
outiworkInteger array of dimension at least (3*n*nlvl + 11*n).
outinfo= 0: successful exit.
< 0: if info = -i, the i-th argument had illegal value.
> 0: The algorithm failed to compute a singular value.
void slalsd(
const char* uplo,
const INT smlsiz,
const INT n,
const INT nrhs,
f32* restrict D,
f32* restrict E,
f32* restrict B,
const INT ldb,
const f32 rcond,
INT* rank,
f32* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void dlalsd(const char *uplo, const INT smlsiz, const INT n, const INT nrhs, f64 *restrict D, f64 *restrict E, f64 *restrict B, const INT ldb, const f64 rcond, INT *rank, f64 *restrict work, INT *restrict iwork, INT *info)#
DLALSD uses the singular value decomposition of A to solve the least squares problem of finding X to minimize the Euclidean norm of each column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-by-NRHS.
The solution X overwrites B.
The singular values of A smaller than RCOND times the largest singular value are treated as zero in solving the least squares problem; in this case a minimum norm solution is returned. The actual singular values are returned in D in ascending order.
Parameters
inuplo= ‘U’: D and E define an upper bidiagonal matrix. = ‘L’: D and E define a lower bidiagonal matrix.
insmlsizThe maximum size of subproblems at the bottom of the tree.
innThe dimension of the bidiagonal matrix. n >= 0.
innrhsThe number of columns of B. nrhs >= 1.
inoutDArray of dimension n. On entry, the main diagonal. On exit, the singular values in ascending order.
inoutEArray of dimension n-1. On entry, the super-diagonal. On exit, E has been destroyed.
inoutBArray of dimension (ldb, nrhs). On input, the right hand sides. On output, the solution X.
inldbThe leading dimension of B. ldb >= max(1, n).
inrcondThe singular values less than or equal to rcond*max(S) are treated as zero. If rcond < 0, machine precision is used.
outrankThe number of singular values > rcond*max(S).
outworkArray of dimension at least (9*n + 2*n*smlsiz + 8*n*nlvl + n*nrhs + (smlsiz+1)^2).
outiworkInteger array of dimension at least (3*n*nlvl + 11*n).
outinfo= 0: successful exit.
< 0: if info = -i, the i-th argument had illegal value.
> 0: The algorithm failed to compute a singular value.
void dlalsd(
const char* uplo,
const INT smlsiz,
const INT n,
const INT nrhs,
f64* restrict D,
f64* restrict E,
f64* restrict B,
const INT ldb,
const f64 rcond,
INT* rank,
f64* restrict work,
INT* restrict iwork,
INT* info
);
Functions
-
void clalsd(const char *uplo, const INT smlsiz, const INT n, const INT nrhs, f32 *restrict D, f32 *restrict E, c64 *restrict B, const INT ldb, const f32 rcond, INT *rank, c64 *restrict work, f32 *restrict rwork, INT *restrict iwork, INT *info)#
CLALSD uses the singular value decomposition of A to solve the least squares problem of finding X to minimize the Euclidean norm of each column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-by-NRHS.
The solution X overwrites B.
The singular values of A smaller than RCOND times the largest singular value are treated as zero in solving the least squares problem; in this case a minimum norm solution is returned. The actual singular values are returned in D in ascending order.
Parameters
inuplo= ‘U’: D and E define an upper bidiagonal matrix. = ‘L’: D and E define a lower bidiagonal matrix.
insmlsizThe maximum size of the subproblems at the bottom of the computation tree.
innThe dimension of the bidiagonal matrix. n >= 0.
innrhsThe number of columns of B. nrhs must be at least 1.
inoutDDouble array, dimension (N). On entry D contains the main diagonal of the bidiagonal matrix. On exit, if info = 0, D contains its singular values.
inoutEDouble array, dimension (N-1). Contains the super-diagonal entries of the bidiagonal matrix. On exit, E has been destroyed.
inoutBComplex array, dimension (ldb, nrhs). On input, B contains the right hand sides of the least squares problem. On output, B contains the solution X.
inldbThe leading dimension of B in the calling subprogram. ldb must be at least max(1, N).
inrcondThe singular values of A less than or equal to RCOND times the largest singular value are treated as zero in solving the least squares problem. If RCOND is negative, machine precision is used instead. For example, if diag(S)*X=B were the least squares problem, where diag(S) is a diagonal matrix of singular values, the solution would be X(i) = B(i) / S(i) if S(i) is greater than RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to RCOND*max(S).
outrankThe number of singular values of A greater than RCOND times the largest singular value.
outworkComplex array, dimension (N * NRHS).
outrworkDouble array, dimension at least (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS + max((SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS)), where NLVL = max(0, INT(LOG_2(MIN(M,N)/(SMLSIZ+1))) + 1).
outiworkInteger array, dimension at least (3*N*NLVL + 11*N).
outinfo= 0: successful exit. < 0: if info = -i, the i-th argument had an illegal value. > 0: The algorithm failed to compute a singular value while working on the submatrix lying in rows and columns INFO/(N+1) through MOD(INFO,N+1).
void clalsd(
const char* uplo,
const INT smlsiz,
const INT n,
const INT nrhs,
f32* restrict D,
f32* restrict E,
c64* restrict B,
const INT ldb,
const f32 rcond,
INT* rank,
c64* restrict work,
f32* restrict rwork,
INT* restrict iwork,
INT* info
);
Functions
-
void zlalsd(const char *uplo, const INT smlsiz, const INT n, const INT nrhs, f64 *restrict D, f64 *restrict E, c128 *restrict B, const INT ldb, const f64 rcond, INT *rank, c128 *restrict work, f64 *restrict rwork, INT *restrict iwork, INT *info)#
ZLALSD uses the singular value decomposition of A to solve the least squares problem of finding X to minimize the Euclidean norm of each column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-by-NRHS.
The solution X overwrites B.
The singular values of A smaller than RCOND times the largest singular value are treated as zero in solving the least squares problem; in this case a minimum norm solution is returned. The actual singular values are returned in D in ascending order.
Parameters
inuplo= ‘U’: D and E define an upper bidiagonal matrix. = ‘L’: D and E define a lower bidiagonal matrix.
insmlsizThe maximum size of the subproblems at the bottom of the computation tree.
innThe dimension of the bidiagonal matrix. n >= 0.
innrhsThe number of columns of B. nrhs must be at least 1.
inoutDDouble array, dimension (N). On entry D contains the main diagonal of the bidiagonal matrix. On exit, if info = 0, D contains its singular values.
inoutEDouble array, dimension (N-1). Contains the super-diagonal entries of the bidiagonal matrix. On exit, E has been destroyed.
inoutBComplex array, dimension (ldb, nrhs). On input, B contains the right hand sides of the least squares problem. On output, B contains the solution X.
inldbThe leading dimension of B in the calling subprogram. ldb must be at least max(1, N).
inrcondThe singular values of A less than or equal to RCOND times the largest singular value are treated as zero in solving the least squares problem. If RCOND is negative, machine precision is used instead. For example, if diag(S)*X=B were the least squares problem, where diag(S) is a diagonal matrix of singular values, the solution would be X(i) = B(i) / S(i) if S(i) is greater than RCOND*max(S), and X(i) = 0 if S(i) is less than or equal to RCOND*max(S).
outrankThe number of singular values of A greater than RCOND times the largest singular value.
outworkComplex array, dimension (N * NRHS).
outrworkDouble array, dimension at least (9*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS + max((SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS)), where NLVL = max(0, INT(LOG_2(MIN(M,N)/(SMLSIZ+1))) + 1).
outiworkInteger array, dimension at least (3*N*NLVL + 11*N).
outinfo= 0: successful exit. < 0: if info = -i, the i-th argument had an illegal value. > 0: The algorithm failed to compute a singular value while working on the submatrix lying in rows and columns INFO/(N+1) through MOD(INFO,N+1).
void zlalsd(
const char* uplo,
const INT smlsiz,
const INT n,
const INT nrhs,
f64* restrict D,
f64* restrict E,
c128* restrict B,
const INT ldb,
const f64 rcond,
INT* rank,
c128* restrict work,
f64* restrict rwork,
INT* restrict iwork,
INT* info
);