Class SingularValueDecomposition
Singular Value Decomposition of arbitrary matrix A
Computes U/S/V of A = U * S * V^T
Useful Properties:
S = square-roots of eigenvalues of A
U = eigenvectors of A * A^T
V = eigenvectors of A^T * A
U * V^T = rotation matrix closest to A
V * Inv(S) * U^T = psuedoinverse of A
U and/or V are rotation matrices but may also contain reflections
Detection: det(U) or det(v) == -1
Removal: if ( det(U) == -1 ) { U *= -1; S *= -1 }
if ( det(V) == -1 ) { V *= -1; S *= -1 } (right? seems to work)
Inheritance
SingularValueDecomposition
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class SingularValueDecomposition
Constructors
SingularValueDecomposition(Int32, Int32, Int32)
Declaration
public SingularValueDecomposition(int numRows, int numCols, int maxIterations)
Parameters
Methods
GetSingularValues(Double[])
Declaration
public void GetSingularValues(double[] singularValues)
Parameters
Type |
Name |
Description |
Double[] |
singularValues |
|
GetU(Double[])
Declaration
public void GetU(double[] uMatrix)
Parameters
Type |
Name |
Description |
Double[] |
uMatrix |
|
GetV(Double[])
Declaration
public void GetV(double[] vMatrix)
Parameters
Type |
Name |
Description |
Double[] |
vMatrix |
|
Solve(Double[], Int32)
Declaration
public uint Solve(double[] input, int sortType = -1)
Parameters
Returns