Packages

class SVD_2by2 extends SVDecomp

The SVD_2by2 is used to solve Singular Value Decomposition for bidiagonal 2-by-2 matrices.

[ f g ] [ 0 h ]

See also

fortranwiki.org/fortran/show/svd

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

Instance Constructors

  1. new SVD_2by2(f: Double, g: Double, h: Double)

    f

    the first diagonal element

    g

    the super-diagonal element

    h

    the second diagonal element

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. 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
  2. def deflate(): VectorD

    Return the two singular values (smallest first) for the bidiagonal 2-by-2 matrix form from the elements f, g and h.

    Return the two singular values (smallest first) for the bidiagonal 2-by-2 matrix form from the elements f, g and h.

    See also

    LAPACK SUBROUTINE DLAS2 (F, G, H, SSMIN, SSMAX)

  3. def deflateV(): (Double, Double, Double, Double, Double, Double)

    Return the two singular values (smallest first) for the bidiagonal 2-by-2 matrix form from the elements f, g and h.

    Return the two singular values (smallest first) for the bidiagonal 2-by-2 matrix form from the elements f, g and h. Also, return the singular vectors.

    See also

    LAPACK SUBROUTINE DLASV2 (F, G, H, SSMIN, SSMAX, SNR, CSR, SNL, CSL)

  4. 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
  5. 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
  6. 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
  7. 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
    SVD_2by2SVDecomp
  8. 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
  9. def factors: (MatriD, MatriD)

    Return the two factored matrices.

    Return the two factored matrices.

    Definition Classes
    SVDecompFactorization
  10. 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
  11. 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
  12. 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
  13. 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