public class ThinSingularValueDecomposition extends Object
Matrix
that is backed by disk.
Note that the current version of (Java)ARPACK is not thread-safe. Allowances
have been made in this implementation to synchronize the call to
SingularValues.decompose()
against the
ThinSingularValueDecomposition
class. Care must be taken if you are
using JARPACK outside this class in a multi-threaded application.
Modifier and Type | Field and Description |
---|---|
double[] |
S
The singular values
|
Jama.Matrix |
U
The U matrix
|
Jama.Matrix |
Vt
The transpose of the V matrix
|
Constructor and Description |
---|
ThinSingularValueDecomposition(Jama.Matrix matrix,
int ndims)
Perform thin SVD on matrix, calculating at most ndims dimensions.
|
ThinSingularValueDecomposition(Matrix matrix,
int ndims)
Perform thin SVD on matrix, calculating at most ndims dimensions.
|
Modifier and Type | Method and Description |
---|---|
Jama.Matrix |
getSmatrix() |
Jama.Matrix |
getSmatrixSqrt() |
static Jama.Matrix |
reduceRank(Jama.Matrix m,
int rank)
Reduce the rank of the input matrix using the thin SVD to get a lower
rank least-squares estimate of the input.
|
protected double[] |
reverse(double[] vector) |
protected Jama.Matrix |
vectorArrayToMatrix(Vector[] vectors,
boolean rows) |
public Jama.Matrix U
public double[] S
public Jama.Matrix Vt
public ThinSingularValueDecomposition(Jama.Matrix matrix, int ndims)
matrix
- the matrixndims
- the number of singular values/vectors to calculate; actual
number may be less.public ThinSingularValueDecomposition(Matrix matrix, int ndims)
matrix
- the matrixndims
- the number of singular values/vectors to calculate; actual
number may be less.protected double[] reverse(double[] vector)
protected Jama.Matrix vectorArrayToMatrix(Vector[] vectors, boolean rows)
public Jama.Matrix getSmatrix()
public Jama.Matrix getSmatrixSqrt()
public static Jama.Matrix reduceRank(Jama.Matrix m, int rank)
m
- matrix to reduce the rank ofrank
- the desired rank