|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnumal.lowprecision.LinearAlgebra
public class LinearAlgebra
References: Wilkinson,J.H., Reinsch,C. : 1971, Handbook of Automatic Computation, Vol. 2, Linear Algebra, Springer-Verlag, Berlin.
Constructor Summary | |
---|---|
LinearAlgebra()
|
Method Summary | |
---|---|
static void |
hshreabid(float[][] a,
int m,
int n,
float[] d,
float[] b,
float[] em)
Reduces an m x n matrix a to a bidiagonal form B. |
static void |
pretfmmat(float[][] a,
int m,
int n,
float[] d)
Calculates the premultiplying matrix from the intermediate results generated by hshreabid(float[][], int, int, float[], float[], float[]) , |
static void |
psttfmmat(float[][] a,
int n,
float[][] v,
float[] b)
Calculates the postmultiplying matrix from the intermediate results generated by hshreabid(float[][], int, int, float[], float[], float[]) , |
static int |
qrisngvaldec(float[][] a,
int m,
int n,
float[] val,
float[][] v,
float[] em)
Calculates the singular value decomposition UDV^T of a given matrix A. |
static int |
qrisngvaldecbid(float[] d,
float[] b,
int m,
int n,
float[][] u,
float[][] v,
float[] em)
Calculates by use of a variant of the QR algorithm the singular value decomposition of an mxn matrix A (m ≥ n), i.e., the mxn matrix U, the nxn diagonal matrix D, and the nxn matrix V for which A=UDV^T, where U^T U = V^T V = I (nxn unit matrix). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearAlgebra()
Method Detail |
---|
public static int qrisngvaldec(float[][] a, int m, int n, float[] val, float[][] v, float[] em)
hshreabid(float[][], int, int, float[], float[], float[])
, the two
transforming matrices are calculated by calling psttfmmat(float[][], int, float[][], float[])
and pretfmmat(float[][], int, int, float[])
,
and finally the singular value decomposition is calculated by qrisngvaldecbid(float[], float[], int, int, float[][], float[][], float[])
.
hshreabid(float[][], int, int, float[], float[], float[])
, psttfmmat(float[][], int, float[][], float[])
, pretfmmat(float[][], int, int, float[])
, qrisngvaldecbid(float[], float[], int, int, float[][], float[][], float[])
.
a
- input: the given mxn matrix output: the matrix U in the singular value decomposition UDV^Tm
- the number of rows of the matrix an
- the number of columns of a, precondition: n ≤ mval
- output: the singular values 1 to nv
- output: V^T (transpose of matrix v) in the singular value decompositionem
- input and output parameters (see above)
public static void hshreabid(float[][] a, int m, int n, float[] d, float[] b, float[] em)
hshreabid(float[][], int, int, float[], float[], float[])
.
Moreover, if a transformation is skipped, a zero is not stored in the diagonal or superdiagonal, but the value that would
have been found if the column or row were in the desired form already is stored.
Basic.tammat(int, int, int, int, float[][], float[][])
, Basic.mattam(int, int, int, int, float[][], float[][])
, Basic.elmcol(int, int, int, int, float[][], float[][], float)
, Basic.elmrow(int, int, int, int, float[][], float[][], float)
a
- input: m by n matrix output: data concerning the premultiplying and postmultiplying matricesm
- number of rowsn
- number of columnsd
- output: diagonal of the bidiagonal matrix Bb
- output: super diagonal of the bidiagonal matrix Bem
- input: em[0] machine precision output: em[1] infinity norm of original matrixpublic static void psttfmmat(float[][] a, int n, float[][] v, float[] b)
hshreabid(float[][], int, int, float[], float[], float[])
,
Basic.elmcol(int, int, int, int, float[][], float[][], float)
, Basic.matmat(int, int, int, int, float[][], float[][])
a
- data concerning postmultiplying matrix, as generated by hshreabid(float[][], int, int, float[], float[], float[])
(nxn)n
- number of columns and rows of av
- output: postmultiplying matrix (nxn)b
- superdiagonal of A as generated by hshreabid(float[][], int, int, float[], float[], float[])
are in the [1:n-1] elements of this arraypublic static void pretfmmat(float[][] a, int m, int n, float[] d)
hshreabid(float[][], int, int, float[], float[], float[])
,
Basic.elmcol(int, int, int, int, float[][], float[][], float)
, Basic.tammat(int, int, int, int, float[][], float[][])
a
- input: data concerning premultiplying matrix, as generated by hshreabid(float[][], int, int, float[], float[], float[])
(nxn) output: premultiplying matrixm
- number of rows of an
- number of columns of a, precondition: n ≤ md
- diagonal as generated by hshreabid(float[][], int, int, float[], float[], float[])
(1xn)public static int qrisngvaldecbid(float[] d, float[] b, int m, int n, float[][] u, float[][] v, float[] em)
hshreabid(float[][], int, int, float[], float[], float[])
.
Note: Matrix A is input as a synthesis of d, b vectors and u and v matrices.
Basic.rotcol(int, int, int, int, float[][], float, float)
.
d
- input: diagonal of the bidiagonal matrix output: singular valuesb
- superdiagonal of the bidiagonal matrix in the [1:n-1] elements of this arraym
- rows of matrix Un
- columns of matrix U (also size of matrix V, vector d and b),u
- input: premultiplying matrix as produced by pretfmmat(float[][], int, int, float[])
output: premultiplying matrix U of the singular value decomposition UDV^Tv
- input: transpose of postmultiplying matrix as produced by psttfmmat(float[][], int, float[][], float[])
output: transpose of postmultiplying matrix V of the singular value decomposition UDV^Tem
- see description above
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |