Class BidiagonalDecompositionRow_FDRM
- java.lang.Object
-
- org.ejml.dense.row.decomposition.bidiagonal.BidiagonalDecompositionRow_FDRM
-
- All Implemented Interfaces:
org.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.FMatrixRMaj>,org.ejml.interfaces.decomposition.BidiagonalDecomposition_F32<org.ejml.data.FMatrixRMaj>,org.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
public class BidiagonalDecompositionRow_FDRM extends java.lang.Object implements org.ejml.interfaces.decomposition.BidiagonalDecomposition_F32<org.ejml.data.FMatrixRMaj>Performs a
BidiagonalDecomposition_F32using householder reflectors. This is efficient on wide or square matrices.
-
-
Constructor Summary
Constructors Constructor Description BidiagonalDecompositionRow_FDRM()BidiagonalDecompositionRow_FDRM(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 Description protected voidcomputeU(int k)protected voidcomputeV(int k)booleandecompose(org.ejml.data.FMatrixRMaj A)Computes the decomposition of the provided matrix.org.ejml.data.FMatrixRMajgetB(org.ejml.data.FMatrixRMaj B, boolean compact)Returns the bidiagonal matrix.voidgetDiagonal(float[] diag, float[] off)float[]getGammasU()Returns gammas from the householder operations for the U matrix.float[]getGammasV()Returns gammas from the householder operations for the V matrix.org.ejml.data.FMatrixRMajgetU(org.ejml.data.FMatrixRMaj U, boolean transpose, boolean compact)Returns the orthogonal U matrix.org.ejml.data.FMatrixRMajgetUBV()The raw UBV matrix that is stored internally.org.ejml.data.FMatrixRMajgetV(org.ejml.data.FMatrixRMaj V, boolean transpose, boolean compact)Returns the orthogonal V matrix.static org.ejml.data.FMatrixRMajhandleB(org.ejml.data.FMatrixRMaj B, boolean compact, int m, int n, int min)static org.ejml.data.FMatrixRMajhandleU(org.ejml.data.FMatrixRMaj U, boolean transpose, boolean compact, int m, int n, int min)static org.ejml.data.FMatrixRMajhandleV(org.ejml.data.FMatrixRMaj V, boolean transpose, boolean compact, int m, int n, int min)protected voidinit(org.ejml.data.FMatrixRMaj A)Sets up internal data structures and creates a copy of the input matrix.booleaninputModified()
-
-
-
Constructor Detail
-
BidiagonalDecompositionRow_FDRM
public BidiagonalDecompositionRow_FDRM(int numElements)
Creates a decompose that defines the specified amount of memory.- Parameters:
numElements- number of elements in the matrix.
-
BidiagonalDecompositionRow_FDRM
public BidiagonalDecompositionRow_FDRM()
-
-
Method Detail
-
decompose
public boolean decompose(org.ejml.data.FMatrixRMaj A)
Computes the decomposition of the provided matrix. If no errors are detected then true is returned, false otherwise.- Specified by:
decomposein interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>- Parameters:
A- The matrix that is being decomposed. Not modified.- Returns:
- If it detects any errors or not.
-
init
protected void init(org.ejml.data.FMatrixRMaj A)
Sets up internal data structures and creates a copy of the input matrix.- Parameters:
A- The input matrix. Not modified.
-
getUBV
public org.ejml.data.FMatrixRMaj getUBV()
The raw UBV matrix that is stored internally.- Returns:
- UBV matrix.
-
getDiagonal
public void getDiagonal(float[] diag, float[] off)- Specified by:
getDiagonalin interfaceorg.ejml.interfaces.decomposition.BidiagonalDecomposition_F32<org.ejml.data.FMatrixRMaj>
-
getB
public org.ejml.data.FMatrixRMaj getB(org.ejml.data.FMatrixRMaj B, boolean compact)Returns the bidiagonal matrix.- Specified by:
getBin interfaceorg.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.FMatrixRMaj>- Parameters:
B- If not null the results are stored here, if null a new matrix is created.- Returns:
- The bidiagonal matrix.
-
handleB
public static org.ejml.data.FMatrixRMaj handleB(org.ejml.data.FMatrixRMaj B, boolean compact, int m, int n, int min)
-
getU
public org.ejml.data.FMatrixRMaj getU(org.ejml.data.FMatrixRMaj U, boolean transpose, boolean compact)Returns the orthogonal U matrix.- Specified by:
getUin interfaceorg.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.FMatrixRMaj>- 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 org.ejml.data.FMatrixRMaj handleU(org.ejml.data.FMatrixRMaj U, boolean transpose, boolean compact, int m, int n, int min)
-
getV
public org.ejml.data.FMatrixRMaj getV(org.ejml.data.FMatrixRMaj V, boolean transpose, boolean compact)Returns the orthogonal V matrix.- Specified by:
getVin interfaceorg.ejml.interfaces.decomposition.BidiagonalDecomposition<org.ejml.data.FMatrixRMaj>- 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 org.ejml.data.FMatrixRMaj handleV(org.ejml.data.FMatrixRMaj V, boolean transpose, boolean compact, int m, int n, int min)
-
computeU
protected void computeU(int k)
-
computeV
protected void computeV(int k)
-
getGammasU
public float[] getGammasU()
Returns gammas from the householder operations for the U matrix.- Returns:
- gammas for householder operations
-
getGammasV
public float[] getGammasV()
Returns gammas from the householder operations for the V matrix.- Returns:
- gammas for householder operations
-
inputModified
public boolean inputModified()
- Specified by:
inputModifiedin interfaceorg.ejml.interfaces.decomposition.DecompositionInterface<org.ejml.data.FMatrixRMaj>
-
-