Fac_SVD

scalation.mathstat.Fac_SVD
See theFac_SVD companion object
class Fac_SVD(a: MatrixD) extends Factorization

Value parameters

a

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

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def conditionNum: Double

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.

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.

Attributes

def factor(): Fac_SVD

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

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

Attributes

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.

Attributes

Return the two factored matrices.

Return the two factored matrices.

Attributes

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.

Value parameters

s

the vector of singular values

u

the left orthongonal matrix

Attributes

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.

Value parameters

u

the left orthongonal matrix

v

the right orthongonal matrix

Attributes

Efficient calculation of inverse matrix a^-1 from existing factorization. a * a^-1 = I

Efficient calculation of inverse matrix a^-1 from existing factorization. a * a^-1 = I

Attributes

def recip(d: VectorD): VectorD

Calculate the reciprocal of the given vector avoiding divide by zero. To handle the problem of a singular matrix, the singular values which are zero are left zero. (This function is similar to 'VectorD.recip ()' except for the zeros part.)

Calculate the reciprocal of the given vector avoiding divide by zero. To handle the problem of a singular matrix, the singular values which are zero are left zero. (This function is similar to 'VectorD.recip ()' except for the zeros part.)

Value parameters

d

the vector of singular values

Attributes

See also
def reorder(ft: FactorType): Unit

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.

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.

Value parameters

ft

the factored matrix (u, s, v)

Attributes

def solve(b: VectorD): VectorD

Solve for x in a^tax = b using Fac_SVD.

Solve for x in a^tax = b using Fac_SVD.

Value parameters

b

the constant vector

Attributes

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.

Value parameters

e

the super-diagonal

k

the upper index

q

the main diagonal

Attributes

Inherited methods

def factor1(): MatrixD

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.

Attributes

Inherited from:
Factorization

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.

Attributes

Inherited from:
Factorization
def factor2(): MatrixD

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.

Attributes

Inherited from:
Factorization
inline def isFactored: Boolean

Return whether the matrix has been factored has aleady been factored.

Return whether the matrix has been factored has aleady been factored.

Attributes

Inherited from:
Factorization
def reset(): Unit

Reset by setting factored to false.

Reset by setting factored to false.

Attributes

Inherited from:
Factorization

Inherited fields

protected var factored: Boolean

Flag indicating whether the matrix has been factored

Flag indicating whether the matrix has been factored

Attributes

Inherited from:
Factorization