Class QRColPivDecompositionHouseholderColumn_D64
- java.lang.Object
-
- org.ejml.alg.dense.decomposition.qr.QRDecompositionHouseholderColumn_D64
-
- org.ejml.alg.dense.decomposition.qr.QRColPivDecompositionHouseholderColumn_D64
-
- All Implemented Interfaces:
- DecompositionInterface<DenseMatrix64F>, QRDecomposition<DenseMatrix64F>, QRPDecomposition<DenseMatrix64F>
public class QRColPivDecompositionHouseholderColumn_D64 extends QRDecompositionHouseholderColumn_D64 implements QRPDecomposition<DenseMatrix64F>
Performs QR decomposition with column pivoting. To prevent overflow/underflow the whole matrix is normalized by the max value, but columns are not normalized individually any more. To enable code reuse it extends
QRDecompositionHouseholderColumn_D64and functions from that class are used whenever possible. Columns are transposed into single arrays, which allow for fast pivots.Decomposition: A*P = Q*R
Based off the description in "Fundamentals of Matrix Computations", 2nd by David S. Watkins.
-
-
Constructor Summary
Constructors Constructor and Description QRColPivDecompositionHouseholderColumn_D64()QRColPivDecompositionHouseholderColumn_D64(double singularThreshold)Configure parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleandecompose(DenseMatrix64F A)To decompose the matrix 'A' it must have full rank.DenseMatrix64FgetPivotMatrix(DenseMatrix64F P)Creates the pivot matrix.int[]getPivots()Ordering of each column after pivoting.DenseMatrix64FgetQ(DenseMatrix64F Q, boolean compact)Computes the Q matrix from the information stored in the QR matrix.intgetRank()Returns the rank as determined by the algorithm.voidsetExpectedMaxSize(int numRows, int numCols)voidsetSingularThreshold(double threshold)Specifies the threshold used to flag a column as being singular.-
Methods inherited from class org.ejml.alg.dense.decomposition.qr.QRDecompositionHouseholderColumn_D64
getGammas, getQR, getR, inputModified
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ejml.interfaces.decomposition.QRDecomposition
getR
-
Methods inherited from interface org.ejml.interfaces.decomposition.DecompositionInterface
inputModified
-
-
-
-
Constructor Detail
-
QRColPivDecompositionHouseholderColumn_D64
public QRColPivDecompositionHouseholderColumn_D64(double singularThreshold)
Configure parameters.- Parameters:
singularThreshold- The singular threshold.
-
QRColPivDecompositionHouseholderColumn_D64
public QRColPivDecompositionHouseholderColumn_D64()
-
-
Method Detail
-
setSingularThreshold
public void setSingularThreshold(double threshold)
Description copied from interface:QRPDecompositionSpecifies the threshold used to flag a column as being singular. The specified threshold is relative and will very depending on the system. The default value is UtilEJML.EPS.
- Specified by:
setSingularThresholdin interfaceQRPDecomposition<DenseMatrix64F>- Parameters:
threshold- Singular threshold.
-
setExpectedMaxSize
public void setExpectedMaxSize(int numRows, int numCols)- Overrides:
setExpectedMaxSizein classQRDecompositionHouseholderColumn_D64
-
getQ
public DenseMatrix64F getQ(DenseMatrix64F Q, boolean compact)
Computes the Q matrix from the information stored in the QR matrix. This operation requires about 4(m2n-mn2+n3/3) flops.- Specified by:
getQin interfaceQRDecomposition<DenseMatrix64F>- Overrides:
getQin classQRDecompositionHouseholderColumn_D64- Parameters:
Q- The orthogonal Q matrix.compact- If true an m by n matrix is created, otherwise n by n.- Returns:
- The Q matrix.
-
decompose
public boolean decompose(DenseMatrix64F A)
To decompose the matrix 'A' it must have full rank. 'A' is a 'm' by 'n' matrix. It requires about 2n*m2-2m2/3 flops.
The matrix provided here can be of different dimension than the one specified in the constructor. It just has to be smaller than or equal to it.
- Specified by:
decomposein interfaceDecompositionInterface<DenseMatrix64F>- Overrides:
decomposein classQRDecompositionHouseholderColumn_D64- Parameters:
A- The matrix which is being decomposed. Modification is implementation dependent.- Returns:
- Returns if it was able to decompose the matrix.
-
getRank
public int getRank()
Description copied from interface:QRPDecompositionReturns the rank as determined by the algorithm. This is dependent upon a fixed threshold and might not be appropriate for some applications.- Specified by:
getRankin interfaceQRPDecomposition<DenseMatrix64F>- Returns:
- Matrix's rank
-
getPivots
public int[] getPivots()
Description copied from interface:QRPDecompositionOrdering of each column after pivoting. The current column i was original at column pivot[i].- Specified by:
getPivotsin interfaceQRPDecomposition<DenseMatrix64F>- Returns:
- Order of columns.
-
getPivotMatrix
public DenseMatrix64F getPivotMatrix(DenseMatrix64F P)
Description copied from interface:QRPDecompositionCreates the pivot matrix.- Specified by:
getPivotMatrixin interfaceQRPDecomposition<DenseMatrix64F>- Parameters:
P- Optional storage for pivot matrix. If null a new matrix will be created.- Returns:
- The pivot matrix.
-
-
DMelt 3.0 © DataMelt by jWork.ORG