Class BidiagonalDecompositionRow_FDRM
java.lang.Object
org.ejml.dense.row.decomposition.bidiagonal.BidiagonalDecompositionRow_FDRM
- All Implemented Interfaces:
BidiagonalDecomposition<FMatrixRMaj>,BidiagonalDecomposition_F32<FMatrixRMaj>,DecompositionInterface<FMatrixRMaj>
- Direct Known Subclasses:
BidiagonalDecompositionRow_MT_FDRM
@Generated("org.ejml.dense.row.decomposition.bidiagonal.BidiagonalDecompositionRow_DDRM")
public class BidiagonalDecompositionRow_FDRM
extends Object
implements BidiagonalDecomposition_F32<FMatrixRMaj>
Performs a BidiagonalDecomposition_F32 using
householder reflectors. This is efficient on wide or square matrices.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBidiagonalDecompositionRow_FDRM(int numElements) Creates a decompose that defines the specified amount of memory. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeU(int k) protected voidcomputeV(int k) booleanComputes the decomposition of the provided matrix.getB(@Nullable FMatrixRMaj B, boolean compact) Returns the bidiagonal matrix.voidgetDiagonal(float[] diag, float[] off) Extracts the diagonal and off diagonal elements from the decomposition.float[]Returns gammas from the householder operations for the U matrix.float[]Returns gammas from the householder operations for the V matrix.getU(@Nullable FMatrixRMaj U, boolean transpose, boolean compact) Returns the orthogonal U matrix.getUBV()The raw UBV matrix that is stored internally.getV(@Nullable FMatrixRMaj V, boolean transpose, boolean compact) Returns the orthogonal V matrix.static FMatrixRMajhandleB(@Nullable FMatrixRMaj B, boolean compact, int m, int n, int min) static FMatrixRMajhandleU(@Nullable FMatrixRMaj U, boolean transpose, boolean compact, int m, int n, int min) static FMatrixRMajhandleV(@Nullable FMatrixRMaj V, boolean transpose, boolean compact, int m, int n, int min) protected voidinit(FMatrixRMaj A) Sets up internal data structures and creates a copy of the input matrix.booleanChecks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.protected voidrank1UpdateMultL(FMatrixRMaj A, float gamma, int colA0, int w0, int w1) protected voidrank1UpdateMultR(FMatrixRMaj A, float gamma, int colA0, int w0, int w1)
-
Field Details
-
b
protected float[] b -
u
protected float[] u
-
-
Constructor Details
-
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 Details
-
decompose
Computes the decomposition of the provided matrix. If no errors are detected then true is returned, false otherwise.- Specified by:
decomposein interfaceDecompositionInterface<FMatrixRMaj>- Parameters:
A- The matrix that is being decomposed. Not modified.- Returns:
- If it detects any errors or not.
-
init
Sets up internal data structures and creates a copy of the input matrix.- Parameters:
A- The input matrix. Not modified.
-
getUBV
The raw UBV matrix that is stored internally.- Returns:
- UBV matrix.
-
getDiagonal
public void getDiagonal(float[] diag, float[] off) Description copied from interface:BidiagonalDecomposition_F32Extracts the diagonal and off diagonal elements from the decomposition.- Specified by:
getDiagonalin interfaceBidiagonalDecomposition_F32<FMatrixRMaj>- Parameters:
diag- diagonal elements from B.off- off diagonal elements form B.
-
getB
Returns the bidiagonal matrix.- Specified by:
getBin interfaceBidiagonalDecomposition<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 FMatrixRMaj handleB(@Nullable @Nullable FMatrixRMaj B, boolean compact, int m, int n, int min) -
getU
Returns the orthogonal U matrix.- Specified by:
getUin interfaceBidiagonalDecomposition<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 FMatrixRMaj handleU(@Nullable @Nullable FMatrixRMaj U, boolean transpose, boolean compact, int m, int n, int min) -
getV
Returns the orthogonal V matrix.- Specified by:
getVin interfaceBidiagonalDecomposition<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 FMatrixRMaj handleV(@Nullable @Nullable FMatrixRMaj V, boolean transpose, boolean compact, int m, int n, int min) -
computeU
protected void computeU(int k) -
rank1UpdateMultL
-
rank1UpdateMultR
-
computeV
protected void computeV(int k) -
getGammasU
public float[] getGammasU()Returns gammas from the householder operations for the U matrix. -
getGammasV
public float[] getGammasV()Returns gammas from the householder operations for the V matrix. -
inputModified
public boolean inputModified()Description copied from interface:DecompositionInterfaceChecks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.- Specified by:
inputModifiedin interfaceDecompositionInterface<FMatrixRMaj>- Returns:
- true if the input matrix to decompose() is modified.
-