|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ejml.ops.SingularOps
public class SingularOps
Operations related to singular value decomposition.
| Constructor Summary | |
|---|---|
SingularOps()
|
|
| Method Summary | |
|---|---|
static void |
checkSvdMatrixSize(DenseMatrix64F U,
boolean tranU,
DenseMatrix64F W,
DenseMatrix64F V,
boolean tranV)
Checks to see if all the provided matrices are the expected size for an SVD. |
static void |
descendingOrder(DenseMatrix64F U,
boolean tranU,
DenseMatrix64F W,
DenseMatrix64F V,
boolean tranV)
Adjusts the matrices so that the singular values are in descending order. |
static void |
descendingOrder(DenseMatrix64F U,
boolean tranU,
double[] singularValues,
int numSingularValues,
DenseMatrix64F V,
boolean tranV)
Similar to descendingOrder(org.ejml.data.DenseMatrix64F, boolean, org.ejml.data.DenseMatrix64F, org.ejml.data.DenseMatrix64F, boolean)
but takes in an array of singular values instead. |
static int |
nullity(SingularValueDecomposition svd,
double threshold)
Extracts the nullity of a matrix using a preexisting decomposition. |
static DenseMatrix64F |
nullSpace(SingularValueDecomposition<DenseMatrix64F> svd,
DenseMatrix64F v)
Computes the null space from the provided singular value. |
static int |
rank(SingularValueDecomposition svd,
double threshold)
Extracts the rank of a matrix using a preexisting decomposition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingularOps()
| Method Detail |
|---|
public static void descendingOrder(DenseMatrix64F U,
boolean tranU,
DenseMatrix64F W,
DenseMatrix64F V,
boolean tranV)
Adjusts the matrices so that the singular values are in descending order.
In most implementations of SVD the singular values are automatically arranged in in descending order. In EJML this is not the case since it is often not needed and some computations can be saved by not doing that.
U - Matrix. Modified.tranU - is U transposed or not.W - Diagonal matrix with singular values. Modified.V - Matrix. Modified.tranV - is V transposed or not.
public static void descendingOrder(DenseMatrix64F U,
boolean tranU,
double[] singularValues,
int numSingularValues,
DenseMatrix64F V,
boolean tranV)
Similar to descendingOrder(org.ejml.data.DenseMatrix64F, boolean, org.ejml.data.DenseMatrix64F, org.ejml.data.DenseMatrix64F, boolean)
but takes in an array of singular values instead.
U - Matrix. Modified.tranU - is U transposed or not.singularValues - Array of singular values. Modified.numSingularValues - Number of elements in singularValues arrayV - Matrix. Modified.tranV - is V transposed or not.
public static void checkSvdMatrixSize(DenseMatrix64F U,
boolean tranU,
DenseMatrix64F W,
DenseMatrix64F V,
boolean tranV)
public static DenseMatrix64F nullSpace(SingularValueDecomposition<DenseMatrix64F> svd,
DenseMatrix64F v)
Computes the null space from the provided singular value. The null space is found by finding the row in V associated with the smallest singular value and it is assumed that there is only one singular value close to zero.
No sanity check is done to ensure that the smallest singular value is sufficiently small. Depending on the matrix's dimension a non-compact SVD might be required.
svd - A precomputed decomposition. Not modified.v - Where the null space is written to. If null then a new matrix is declared. Modified.
public static int rank(SingularValueDecomposition svd,
double threshold)
svd - A precomputed decomposition. Not modified.threshold - Tolerance used to determine of a singular value is singular.
public static int nullity(SingularValueDecomposition svd,
double threshold)
svd - A precomputed decomposition. Not modified.threshold - Tolerance used to determine of a singular value is singular.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||