Class QrLeftLookingDecomposition_FSCC
- All Implemented Interfaces:
DecompositionInterface<FMatrixSparseCSC>
,DecompositionSparseInterface<FMatrixSparseCSC>
,QRDecomposition<FMatrixSparseCSC>
,QRSparseDecomposition<FMatrixSparseCSC>
Left-looking QR decomposition algorithm for sparse matrices. A=Q*R
NOTE: See qr_left on page 71 and cs_qr() in csparse
-
Constructor Summary
ConstructorDescriptionQrLeftLookingDecomposition_FSCC
(@Nullable ComputePermutation<FMatrixSparseCSC> permutation) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Computes the decomposition of the input matrix.float[]
getBeta()
float
getBeta
(int index) int[]
getGwork()
getGx()
getQ
(@Nullable FMatrixSparseCSC Q, boolean compact) Returns the Q matrix from the decomposition.getR()
getR
(@Nullable FMatrixSparseCSC R, boolean compact) Returns the R matrix from the decomposition.getV()
boolean
Checks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)
is modified during the decomposition process.boolean
boolean
boolean
Checks to see if the structure is locked.void
setStructureLocked
(boolean locked) Save results from structural analysis step.
-
Constructor Details
-
QrLeftLookingDecomposition_FSCC
public QrLeftLookingDecomposition_FSCC(@Nullable @Nullable ComputePermutation<FMatrixSparseCSC> permutation)
-
-
Method Details
-
decompose
Description copied from interface:DecompositionInterface
Computes the decomposition of the input matrix. Depending on the implementation the input matrix might be stored internally or modified. If it is modified then the functionDecompositionInterface.inputModified()
will return true and the matrix should not be modified until the decomposition is no longer needed.- Specified by:
decompose
in interfaceDecompositionInterface<FMatrixSparseCSC>
- Parameters:
A
- The matrix which is being decomposed. Modification is implementation dependent.- Returns:
- Returns if it was able to decompose the matrix.
-
getQ
Description copied from interface:QRDecomposition
Returns the Q matrix from the decomposition. Should only be called after
DecompositionInterface.decompose(org.ejml.data.Matrix)
has been called.- Specified by:
getQ
in interfaceQRDecomposition<FMatrixSparseCSC>
- Parameters:
Q
- (Input) Storage for Q. Reshaped to correct size automatically. If null a new matrix is created.compact
- If true an m by n matrix is created, otherwise n by n.- Returns:
- The Q matrix.
-
getR
Description copied from interface:QRDecomposition
Returns the R matrix from the decomposition. Should only be called after
DecompositionInterface.decompose(org.ejml.data.Matrix)
has been.If setZeros is true then an n × m matrix is required and all the elements are set. If setZeros is false then the matrix must be at least m × m and only the upper triangular elements are set.
- Specified by:
getR
in interfaceQRDecomposition<FMatrixSparseCSC>
- Parameters:
R
- (Input) Storage for R. Reshaped to correct size automatically. If null a new matrix is created.compact
- If true only the upper triangular elements are set- Returns:
- The R matrix.
-
inputModified
public boolean inputModified()Description copied from interface:DecompositionInterface
Checks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)
is modified during the decomposition process.- Specified by:
inputModified
in interfaceDecompositionInterface<FMatrixSparseCSC>
- Returns:
- true if the input matrix to decompose() is modified.
-
getGwork
-
getGx
-
getStructure
-
getV
-
getR
-
getBeta
public float[] getBeta() -
getBeta
public float getBeta(int index) -
getFillPermutation
public int[] getFillPermutation() -
isFillPermutated
public boolean isFillPermutated() -
isSingular
public boolean isSingular() -
setStructureLocked
public void setStructureLocked(boolean locked) Description copied from interface:DecompositionSparseInterface
Save results from structural analysis step. This can reduce computations if a matrix with the exactly same non-zero pattern is decomposed in the future. If a matrix has yet to be processed then the structure of the next matrix is saved. If a matrix has already been processed then the structure of the most recently processed matrix will be saved.
- Specified by:
setStructureLocked
in interfaceDecompositionSparseInterface<FMatrixSparseCSC>
-
isStructureLocked
public boolean isStructureLocked()Description copied from interface:DecompositionSparseInterface
Checks to see if the structure is locked.- Specified by:
isStructureLocked
in interfaceDecompositionSparseInterface<FMatrixSparseCSC>
- Returns:
- true if locked or false if not locked.
-