Class BiDiagonalizationByGolubKahanLanczos
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.factorization.diagonalization.BiDiagonalizationByGolubKahanLanczos
-
- All Implemented Interfaces:
BiDiagonalization
public class BiDiagonalizationByGolubKahanLanczos extends Object implements BiDiagonalization
This implementation uses Golub-Kahan-Lanczos algorithm with reorthogonalization. A tiny valueepsilon
is given for checking whether α or β equals to zero.
-
-
Constructor Summary
Constructors Constructor Description BiDiagonalizationByGolubKahanLanczos(Matrix A)
Runs the Golub-Kahan-Lanczos bi-diagonalization for a tall matrix.BiDiagonalizationByGolubKahanLanczos(Matrix A, double epsilon, RandomLongGenerator rlg)
Runs the Golub-Kahan-Lanczos bi-diagonalization for a tall matrix.BiDiagonalizationByGolubKahanLanczos(Matrix A, RandomLongGenerator rlg)
Runs the Golub-Kahan-Lanczos bi-diagonalization for a tall matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BidiagonalMatrix
B()
Gets B, which is the square upper part ofU.t().multiply(A).multiply(V)
.Matrix
U()
Gets U, where U' = Uk * ...Matrix
V()
Gets V, where V' = Vk * ...
-
-
-
Constructor Detail
-
BiDiagonalizationByGolubKahanLanczos
public BiDiagonalizationByGolubKahanLanczos(Matrix A)
Runs the Golub-Kahan-Lanczos bi-diagonalization for a tall matrix.- Parameters:
A
- the tall matrix
-
BiDiagonalizationByGolubKahanLanczos
public BiDiagonalizationByGolubKahanLanczos(Matrix A, RandomLongGenerator rlg)
Runs the Golub-Kahan-Lanczos bi-diagonalization for a tall matrix.- Parameters:
A
- the tall matrixrlg
- the random number generator for generation of the first column vector in V
-
BiDiagonalizationByGolubKahanLanczos
public BiDiagonalizationByGolubKahanLanczos(Matrix A, double epsilon, RandomLongGenerator rlg)
Runs the Golub-Kahan-Lanczos bi-diagonalization for a tall matrix.- Parameters:
A
- the tall matrixepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0rlg
- the random number generator for picking the first column vector in V
-
-
Method Detail
-
B
public BidiagonalMatrix B()
Description copied from interface:BiDiagonalization
Gets B, which is the square upper part ofU.t().multiply(A).multiply(V)
. The dimension of B is n x n.- Specified by:
B
in interfaceBiDiagonalization
- Returns:
- B
-
U
public Matrix U()
Description copied from interface:BiDiagonalization
Gets U, where U' = Uk * ... * U1,k = A.nCols()
. The dimension of U is m x m.- Specified by:
U
in interfaceBiDiagonalization
- Returns:
- U
-
V
public Matrix V()
Description copied from interface:BiDiagonalization
Gets V, where V' = Vk * ... * V1,k = A.nCols() - 2
. The dimension of V is n x n.- Specified by:
V
in interfaceBiDiagonalization
- Returns:
- V
-
-