org.ejml.alg.dense.decomposition.bidiagonal
Class BidiagonalDecompositionRow_D64
- java.lang.Object
-
- org.ejml.alg.dense.decomposition.bidiagonal.BidiagonalDecompositionRow_D64
-
- All Implemented Interfaces:
- BidiagonalDecomposition<DenseMatrix64F>, DecompositionInterface<DenseMatrix64F>
public class BidiagonalDecompositionRow_D64 extends java.lang.Object implements BidiagonalDecomposition<DenseMatrix64F>
Performs a
BidiagonalDecompositionusing householder reflectors. This is efficient on wide or square matrices.
-
-
Constructor Summary
Constructors Constructor and Description BidiagonalDecompositionRow_D64()BidiagonalDecompositionRow_D64(int numElements)Creates a decompose that defines the specified amount of memory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleandecompose(DenseMatrix64F A)Computes the decomposition of the provided matrix.DenseMatrix64FgetB(DenseMatrix64F B, boolean compact)Returns the bidiagonal matrix.voidgetDiagonal(double[] diag, double[] off)Extracts the diagonal and off diagonal elements from the decomposition.double[]getGammasU()Returns gammas from the householder operations for the U matrix.double[]getGammasV()Returns gammas from the householder operations for the V matrix.DenseMatrix64FgetU(DenseMatrix64F U, boolean transpose, boolean compact)Returns the orthogonal U matrix.DenseMatrix64FgetUBV()The raw UBV matrix that is stored internally.DenseMatrix64FgetV(DenseMatrix64F V, boolean transpose, boolean compact)Returns the orthogonal V matrix.static DenseMatrix64FhandleB(DenseMatrix64F B, boolean compact, int m, int n, int min)static DenseMatrix64FhandleU(DenseMatrix64F U, boolean transpose, boolean compact, int m, int n, int min)static DenseMatrix64FhandleV(DenseMatrix64F V, boolean transpose, boolean compact, int m, int n, int min)booleaninputModified()Is the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.
-
-
-
Constructor Detail
-
BidiagonalDecompositionRow_D64
public BidiagonalDecompositionRow_D64(int numElements)
Creates a decompose that defines the specified amount of memory.- Parameters:
numElements- number of elements in the matrix.
-
BidiagonalDecompositionRow_D64
public BidiagonalDecompositionRow_D64()
-
-
Method Detail
-
decompose
public boolean decompose(DenseMatrix64F A)
Computes the decomposition of the provided matrix. If no errors are detected then true is returned, false otherwise.- Specified by:
decomposein interfaceDecompositionInterface<DenseMatrix64F>- Parameters:
A- The matrix that is being decomposed. Not modified.- Returns:
- If it detects any errors or not.
-
getUBV
public DenseMatrix64F getUBV()
The raw UBV matrix that is stored internally.- Returns:
- UBV matrix.
-
getDiagonal
public void getDiagonal(double[] diag, double[] off)Description copied from interface:BidiagonalDecompositionExtracts the diagonal and off diagonal elements from the decomposition.- Specified by:
getDiagonalin interfaceBidiagonalDecomposition<DenseMatrix64F>- Parameters:
diag- diagonal elements from B.off- off diagonal elements form B.
-
getB
public DenseMatrix64F getB(DenseMatrix64F B, boolean compact)
Returns the bidiagonal matrix.- Specified by:
getBin interfaceBidiagonalDecomposition<DenseMatrix64F>- Parameters:
B- If not null the results are stored here, if null a new matrix is created.- Returns:
- The bidiagonal matrix.
-
handleB
public static DenseMatrix64F handleB(DenseMatrix64F B, boolean compact, int m, int n, int min)
-
getU
public DenseMatrix64F getU(DenseMatrix64F U, boolean transpose, boolean compact)
Returns the orthogonal U matrix.- Specified by:
getUin interfaceBidiagonalDecomposition<DenseMatrix64F>- Parameters:
U- If not null then the results will be stored here. Otherwise a new matrix will be created.- Returns:
- The extracted Q matrix.
-
handleU
public static DenseMatrix64F handleU(DenseMatrix64F U, boolean transpose, boolean compact, int m, int n, int min)
-
getV
public DenseMatrix64F getV(DenseMatrix64F V, boolean transpose, boolean compact)
Returns the orthogonal V matrix.- Specified by:
getVin interfaceBidiagonalDecomposition<DenseMatrix64F>- Parameters:
V- If not null then the results will be stored here. Otherwise a new matrix will be created.- Returns:
- The extracted Q matrix.
-
handleV
public static DenseMatrix64F handleV(DenseMatrix64F V, boolean transpose, boolean compact, int m, int n, int min)
-
getGammasU
public double[] getGammasU()
Returns gammas from the householder operations for the U matrix.- Returns:
- gammas for householder operations
-
getGammasV
public double[] getGammasV()
Returns gammas from the householder operations for the V matrix.- Returns:
- gammas for householder operations
-
inputModified
public boolean inputModified()
Description copied from interface:DecompositionInterfaceIs the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.- Specified by:
inputModifiedin interfaceDecompositionInterface<DenseMatrix64F>- Returns:
- true if the input matrix to decompose() is modified.
-
-
DMelt 3.0 © DataMelt by jWork.ORG