Packages

class SVD3 extends SVDecomp

The SVD3 class is used to solve Singular Value Decomposition for bidiagonal matrices.

It computes the singular values and, optionally, the right and/or left singular vectors from the singular value decomposition 'SVD' of a real n-by-n (upper) bidiagonal matrix B using the implicit zero-shift 'QR' algorithm. The 'SVD' of B has the form

B = Q * S * P.t

where S is the diagonal matrix of singular values, Q is an orthogonal matrix of left singular vectors, and P is an orthogonal matrix of right singular vectors. If left singular vectors are requested, this subroutine actually returns U*Q instead of Q, and, if right singular vectors are requested, this subroutine returns P.t * VT instead of P.T, for given real input matrices U and VT. When U and VT are the orthogonal matrices that reduce a general matrix A to bidiagonal form: A = U*B*VT, as computed by DGEBRD, then

A = (U*Q) * S * (P.t*VT)

is the 'SVD' of the general matrix A. A positive tolerance 'TOL' gives relative accuracy; for absolute accuracy negate it.

See also

"Computing Small Singular Values of Bidiagonal Matrices With Guaranteed High Relative Accuracy,"

J. Demmel and W. Kahan, LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. 11:5, pp. 873-912, Sept 1990)

"Accurate singular values and differential qd algorithms," B. Parlett and V. Fernando,

Technical Report CPAM-554, Mathematics Department, University of California at Berkeley, July 1992

fortranwiki.org/fortran/show/svd

LAPACK SUBROUTINE DBDSQR (UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, LDU, C, LDC, WORK, INFO)

Linear Supertypes
SVDecomp, Factorization, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SVD3
  2. SVDecomp
  3. Factorization
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SVD3(b: BidMatrixD, vt: MatrixD = new MatrixD (0, 0), u: MatrixD = new MatrixD (0, 0))

    vt

    the right orthogonal matrix from b = bidiagonalize (a)

    u

    the left orthogonal matrix from b = bidiagonalize (a)

Type Members

  1. type FactorType = (MatriD, VectoD, MatriD)

    Factor type contains 'u, s, v' which are the left orthogonal matrix, the diagonal matrix/vector containing singular values and the right orthogonal matrix.

    Factor type contains 'u, s, v' which are the left orthogonal matrix, the diagonal matrix/vector containing singular values and the right orthogonal matrix.

    Definition Classes
    SVDecomp
  2. type FactorTypeFull = (MatriD, MatriD, MatriD)
    Definition Classes
    SVDecomp

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def calcThreshold(): Double

    Calculate the desired threshold for setting elements to zero.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  7. def conditionNum: Double

    Compute the condition number of 'this' matrix, i.e., the ratio of the largest singular value to the smallest.

    Compute the condition number of 'this' matrix, i.e., the ratio of the largest singular value to the smallest. Note, if not of full rank, it will be infinity.

    Definition Classes
    SVDecomp
  8. def countNonzeroElements(): Int

    Count the number of nonzero elements in the super-diagonal.

    Count the number of nonzero elements in the super-diagonal. Call if the maximum number of iterations exceeded, failure to converge

  9. def deflate(): VectorD

    Deflate the bidiagonal matrix by iteratively turning super-diagonal elements to zero.

    Deflate the bidiagonal matrix by iteratively turning super-diagonal elements to zero. Then return the vector of singular values (i.e., the main diagonal).

  10. def deflateV(): (VectorD, MatrixD, MatrixD)

    Deflate the bidiagonal matrix by iteratively turning super-diagonal elements to zero.

    Deflate the bidiagonal matrix by iteratively turning super-diagonal elements to zero. Then return the vector of singular values and the matrices of singular vectors.

  11. def deflate_2by2(ll: Int): Unit

    Deflate 2 by 2 block, handle separately.

    Deflate 2 by 2 block, handle separately.

    ll

    the lower index

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def factor(): SVDecomp

    Factor/deflate the matrix by iteratively turning elements not in the main diagonal to zero.

    Factor/deflate the matrix by iteratively turning elements not in the main diagonal to zero.

    Definition Classes
    SVDecompFactorization
  15. def factor1(): MatriD

    Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the first matrix.

    Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the first matrix.

    Definition Classes
    Factorization
  16. def factor12(): (MatriD, MatriD)

    Factor a matrix into the product of two matrices, e.g., 'a = l * l.t' or a = q * r, returning both the first and second matrices.

    Factor a matrix into the product of two matrices, e.g., 'a = l * l.t' or a = q * r, returning both the first and second matrices.

    Definition Classes
    Factorization
  17. def factor123(): FactorType

    Factor matrix 'a' forming a diagonal matrix consisting of singular values and return the singular values in a vector.

    Factor matrix 'a' forming a diagonal matrix consisting of singular values and return the singular values in a vector.

    Definition Classes
    SVD3SVDecomp
  18. def factor2(): MatriD

    Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the second matrix.

    Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the second matrix.

    Definition Classes
    Factorization
  19. val factored: Boolean

    Flag indicating whether the matrix has been factored

    Flag indicating whether the matrix has been factored

    Attributes
    protected
    Definition Classes
    Factorization
  20. def factors: (MatriD, MatriD)

    Return the two factored matrices.

    Return the two factored matrices.

    Definition Classes
    SVDecompFactorization
  21. def flip(u: MatriD, v: MatriD): Unit

    Flip negative main diagonal elements in the singular vectors to positive.

    Flip negative main diagonal elements in the singular vectors to positive.

    u

    the left orthongonal matrix

    v

    the right orthongonal matrix

    Definition Classes
    SVDecomp
  22. def flip(u: MatriD, s: VectoD): Unit

    Flip negative singular values to positive and set singular values close to zero to zero.

    Flip negative singular values to positive and set singular values close to zero to zero.

    u

    the left orthongonal matrix

    s

    the vector of singular values

    Definition Classes
    SVDecomp
  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def max3(x: Double, y: Double, z: Double): Double
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. def reorder(ft: FactorType): Unit

    Reorder the singular values to be in non-increasing order.

    Reorder the singular values to be in non-increasing order. Must swap singular vectors in lock step with singular values. To minimize the number of swaps, selection sort is used.

    ft

    the factored matrix (u, s, v)

    Definition Classes
    SVDecomp
  31. def solve(b: VectoD): VectoD

    Solve for 'x' in 'a^t*a*x = b' using SVD.

    Solve for 'x' in 'a^t*a*x = b' using SVD.

    b

    the constant vector

    Definition Classes
    SVDecompFactorization
  32. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from SVDecomp

Inherited from Factorization

Inherited from AnyRef

Inherited from Any

Ungrouped