bdsvdx#

Functions

void sbdsvdx(
    const char*          uplo,
    const char*          jobz,
    const char*          range,
    const INT            n,
          f32*  restrict D,
          f32*  restrict E,
    const f32            vl,
    const f32            vu,
    const INT            il,
    const INT            iu,
          INT*           ns,
          f32*  restrict S,
          f32*  restrict Z,
    const INT            ldz,
          f32*  restrict work,
          INT*  restrict iwork,
          INT*           info
);
void sbdsvdx(const char *uplo, const char *jobz, const char *range, const INT n, f32 *restrict D, f32 *restrict E, const f32 vl, const f32 vu, const INT il, const INT iu, INT *ns, f32 *restrict S, f32 *restrict Z, const INT ldz, f32 *restrict work, INT *restrict iwork, INT *info)#

SBDSVDX computes the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT, where S is a diagonal matrix with non-negative diagonal elements (the singular values of B), and U and VT are orthogonal matrices of left and right singular vectors, respectively.

Given an upper bidiagonal B with diagonal D = [ d_1 d_2 … d_N ] and superdiagonal E = [ e_1 e_2 … e_N-1 ], SBDSVDX computes the singular value decomposition of B through the eigenvalues and eigenvectors of the N*2-by-N*2 tridiagonal matrix

   |  0  d_1                |
   | d_1  0  e_1            |
TGK = | e_1 0 d_2 | | d_2 . . | | … |

Parameters

in
uplo

= ‘U’: B is upper bidiagonal. = ‘L’: B is lower bidiagonal.

in
jobz

= ‘N’: Compute singular values only. = ‘V’: Compute singular values and singular vectors.

in
range

= ‘A’: all singular values will be found. = ‘V’: all singular values in [VL,VU) will be found. = ‘I’: the IL-th through IU-th singular values.

in
n

The order of the bidiagonal matrix. n >= 0.

in
D

Array of dimension n. Diagonal elements.

in
E

Array of dimension max(1,n-1). Superdiagonal elements.

in
vl

If range=’V’, lower bound of interval for singular values.

in
vu

If range=’V’, upper bound of interval. vu > vl.

in
il

If range=’I’, index of smallest singular value (0-based).

in
iu

If range=’I’, index of largest singular value (0-based).

out
ns

Number of singular values found. 0 <= ns <= n.

out
S

Array (n). First ns elements contain selected singular values.

out
Z

Array (ldz, K). If jobz=’V’, singular vectors stored as Z = [U; V] with U in rows 1..n and V in rows n+1..2*n.

in
ldz

Leading dimension of Z. ldz >= 1, ldz >= 2*n if jobz=’V’.

out
work

Array of dimension 14*n.

out
iwork

Integer array of dimension 12*n.

out
info

  • = 0: success.

  • < 0: illegal argument.

  • > 0: i eigenvectors failed to converge in SSTEVX.

Functions

void dbdsvdx(
    const char*          uplo,
    const char*          jobz,
    const char*          range,
    const INT            n,
          f64*  restrict D,
          f64*  restrict E,
    const f64            vl,
    const f64            vu,
    const INT            il,
    const INT            iu,
          INT*           ns,
          f64*  restrict S,
          f64*  restrict Z,
    const INT            ldz,
          f64*  restrict work,
          INT*  restrict iwork,
          INT*           info
);
void dbdsvdx(const char *uplo, const char *jobz, const char *range, const INT n, f64 *restrict D, f64 *restrict E, const f64 vl, const f64 vu, const INT il, const INT iu, INT *ns, f64 *restrict S, f64 *restrict Z, const INT ldz, f64 *restrict work, INT *restrict iwork, INT *info)#

DBDSVDX computes the singular value decomposition (SVD) of a real N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT, where S is a diagonal matrix with non-negative diagonal elements (the singular values of B), and U and VT are orthogonal matrices of left and right singular vectors, respectively.

Given an upper bidiagonal B with diagonal D = [ d_1 d_2 … d_N ] and superdiagonal E = [ e_1 e_2 … e_N-1 ], DBDSVDX computes the singular value decomposition of B through the eigenvalues and eigenvectors of the N*2-by-N*2 tridiagonal matrix

   |  0  d_1                |
   | d_1  0  e_1            |
TGK = | e_1 0 d_2 | | d_2 . . | | … |

Parameters

in
uplo

= ‘U’: B is upper bidiagonal. = ‘L’: B is lower bidiagonal.

in
jobz

= ‘N’: Compute singular values only. = ‘V’: Compute singular values and singular vectors.

in
range

= ‘A’: all singular values will be found. = ‘V’: all singular values in [VL,VU) will be found. = ‘I’: the IL-th through IU-th singular values.

in
n

The order of the bidiagonal matrix. n >= 0.

in
D

Array of dimension n. Diagonal elements.

in
E

Array of dimension max(1,n-1). Superdiagonal elements.

in
vl

If range=’V’, lower bound of interval for singular values.

in
vu

If range=’V’, upper bound of interval. vu > vl.

in
il

If range=’I’, index of smallest singular value (0-based).

in
iu

If range=’I’, index of largest singular value (0-based).

out
ns

Number of singular values found. 0 <= ns <= n.

out
S

Array (n). First ns elements contain selected singular values.

out
Z

Array (ldz, K). If jobz=’V’, singular vectors stored as Z = [U; V] with U in rows 1..n and V in rows n+1..2*n.

in
ldz

Leading dimension of Z. ldz >= 1, ldz >= 2*n if jobz=’V’.

out
work

Array of dimension 14*n.

out
iwork

Integer array of dimension 12*n.

out
info

  • = 0: success.

  • < 0: illegal argument.

  • > 0: i eigenvectors failed to converge in DSTEVX.