Packages

class SVD extends SVDecomp with Error

The SVD class is used to compute the Singular Value Decomposition 'SVD' of matrix 'a' using the Golub-Kahan-Reinsch Algorithm. Factor/decompose matrix 'a' into the product of three matrices:

a = u * q * v.t where u is an m-by-n matrix of orthogonal eigenvectors of 'a * a.t' (LEFT SINGULAR VECTORS) q is an n-by-n diagonal matrix of square roots of eigenvalues of 'a.t * a' & 'a * a.t' (SINGULAR VALUES) v is an n-by-n matrix of orthogonal eigenvectors of 'a.t * a' (RIGHT SINGULAR VECTORS)

FIX: reduce side-effects - local changes to variable that are important globally ------------------------------------------------------------------------------

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

Instance Constructors

  1. new SVD(a: MatrixD)

    a

    the m-by-n matrix to factor/decompose (requires m >= n)

Type Members

  1. type FactorType = (MatrixD, VectorD, MatrixD)

    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 = (MatrixD, MatrixD, MatrixD)
    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 clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def factor(): (MatrixD, VectorD, MatrixD)

    Factor matrix 'a' into the product of a matrix of left singular vectors 'u', a vector of singular values 'q' and a matrix of right singular vectors 'v' such that 'a = u ** q * v.t'.

    Factor matrix 'a' into the product of a matrix of left singular vectors 'u', a vector of singular values 'q' and a matrix of right singular vectors 'v' such that 'a = u ** q * v.t'.

    Definition Classes
    SVDSVDecomp
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def flaw(method: String, message: String): Unit

    Show the flaw by printing the error message.

    Show the flaw by printing the error message.

    method

    the method where the error occurred

    message

    the error message

    Definition Classes
    Error
  11. def flip(u: MatrixD, v: MatrixD): 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
  12. def flip(u: MatrixD, s: VectorD): 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
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def norm(d1: Double, d2: Double): Double

    Compute the norm/length of vector (d1, d2).

    Compute the norm/length of vector (d1, d2).

    d1

    norm/length in first dimension

    d2

    norm/length in second dimension

  18. final def notify(): Unit
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  20. 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
  21. def shiftFromBottom(k: Int, e: VectorD, q: VectorD): Unit

    Shift from bottom 2x2 minor.

    Shift from bottom 2x2 minor.

    k

    the upper index

    e

    the super-diagonal

    q

    the main diagonal

  22. def solve(b: VectorD): VectorD

    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

  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def testFSplitting(k: Int, e: VectorD, q: VectorD): Unit

    Test super-diagonal element 'e(l)' and main diagonal element 'q(l-1)' to set the lower index 'l'.

    Test super-diagonal element 'e(l)' and main diagonal element 'q(l-1)' to set the lower index 'l'.

    k

    the upper index

    e

    the super-diagonal

    q

    the main diagonal

  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Error

Inherited from SVDecomp

Inherited from AnyRef

Inherited from Any

Ungrouped