Interface QR<N extends java.lang.Comparable<N>>
-
- All Superinterfaces:
DeterminantTask<N>,InverterTask<N>,InvertibleFactor<N>,MatrixDecomposition<N>,MatrixDecomposition.Determinant<N>,MatrixDecomposition.EconomySize<N>,MatrixDecomposition.Ordered<N>,MatrixDecomposition.RankRevealing<N>,MatrixDecomposition.Solver<N>,MatrixDecomposition.Updatable<N>,MatrixTask<N>,Provider2D,Provider2D.Determinant<N>,Provider2D.Inverse<java.util.Optional<MatrixStore<N>>>,Provider2D.Rank,Provider2D.Solution<java.util.Optional<MatrixStore<N>>>,SolverTask<N>,Structure1D,Structure2D
- All Known Implementing Classes:
DenseQR,DenseQR.C128,DenseQR.H256,DenseQR.Q128,DenseQR.R064,DenseQR.R128,RawQR
public interface QR<N extends java.lang.Comparable<N>> extends MatrixDecomposition.Updatable<N>, MatrixDecomposition.Solver<N>, MatrixDecomposition.EconomySize<N>, MatrixDecomposition.Determinant<N>, MatrixDecomposition.RankRevealing<N>
QR: [A] = [Q][R] Decomposes [this] into [Q] and [R] where:- [Q] is an orthogonal matrix (orthonormal columns). It has the same number of rows as [this].
- [R] is a right (upper) triangular matrix. It has the same number of columns as [this].
- [this] = [Q][R]
You create instances of (some subclass of) this class by calling one of the static factory methods: Q128, C128, #PRIMITIVE or #make(Access2D)
The QR decompostion always exists, even if the matrix does not have full column rank, so the compute method will never fail. The primary use of the QR decomposition is in the least squares solution of overdetermined systems of simultaneous linear equations. This will fail if the matrix does not have full column rank. The rank must be equal to the number of columns.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceQR.Factory<N extends java.lang.Comparable<N>>-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.transformation.InvertibleFactor
InvertibleFactor.IdentityFactor<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
MatrixDecomposition.Determinant<N extends java.lang.Comparable<N>>, MatrixDecomposition.EconomySize<N extends java.lang.Comparable<N>>, MatrixDecomposition.Hermitian<N extends java.lang.Comparable<N>>, MatrixDecomposition.Ordered<N extends java.lang.Comparable<N>>, MatrixDecomposition.Pivoting<N extends java.lang.Comparable<N>>, MatrixDecomposition.RankRevealing<N extends java.lang.Comparable<N>>, MatrixDecomposition.Solver<N extends java.lang.Comparable<N>>, MatrixDecomposition.Updatable<N extends java.lang.Comparable<N>>, MatrixDecomposition.Values<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.Provider2D
Provider2D.Condition, Provider2D.Determinant<N extends java.lang.Comparable<N>>, Provider2D.Eigenpairs, Provider2D.Hermitian, Provider2D.Inverse<M>, Provider2D.Rank, Provider2D.Solution<M>, Provider2D.Symmetric, Provider2D.Trace<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,B extends Structure2D.Logical<S,B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
-
-
Field Summary
Fields Modifier and Type Field Description static QR.Factory<ComplexNumber>C128static QR.Factory<Quaternion>H256static QR.Factory<RationalNumber>Q128static QR.Factory<java.lang.Double>R064static QR.Factory<Quadruple>R128-
Fields inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
TYPICAL
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <N extends java.lang.Comparable<N>>
booleanequals(MatrixStore<N> matrix, QR<N> decomposition, NumberContext context)default voidftran(PhysicalStore<N> arg)Forward-transformationMatrixStore<N>getQ()MatrixStore<N>getR()default booleanisOrdered()This is a property of the algorithm/implementation, not the data.default MatrixStore<N>reconstruct()default booleanupdateColumn(int columnIndex, Access1D.Collectable<N,? super TransformableRegion<N>> newColumn)Updates the decomposition when a column in the original matrix is replaced.-
Methods inherited from interface org.ojalgo.matrix.task.DeterminantTask
calculateDeterminant
-
Methods inherited from interface org.ojalgo.matrix.task.InverterTask
invert, invert, preallocate
-
Methods inherited from interface org.ojalgo.matrix.transformation.InvertibleFactor
btran
-
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
decompose, isComputed, reset
-
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.Determinant
getDeterminant, toDeterminantProvider
-
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.EconomySize
isFullSize
-
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.RankRevealing
countSignificant, getRank, getRankThreshold, isFullRank
-
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.Solver
compute, getInverse, getInverse, getSolution, getSolution, invert, isSolvable, preallocate, solve, toInverseProvider, toSolutionProvider
-
Methods inherited from interface org.ojalgo.matrix.task.SolverTask
preallocate, preallocate, solve, solve
-
Methods inherited from interface org.ojalgo.structure.Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, getColDim, getMaxDim, getMinDim, getRowDim, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
-
-
-
Field Detail
-
C128
static final QR.Factory<ComplexNumber> C128
-
H256
static final QR.Factory<Quaternion> H256
-
Q128
static final QR.Factory<RationalNumber> Q128
-
R064
static final QR.Factory<java.lang.Double> R064
-
R128
static final QR.Factory<Quadruple> R128
-
-
Method Detail
-
equals
static <N extends java.lang.Comparable<N>> boolean equals(MatrixStore<N> matrix, QR<N> decomposition, NumberContext context)
-
ftran
default void ftran(PhysicalStore<N> arg)
Description copied from interface:InvertibleFactorForward-transformationSolve [A][x] = [b] by transforming [b] into [x] in-place.
- Specified by:
ftranin interfaceInvertibleFactor<N extends java.lang.Comparable<N>>- Parameters:
arg- [b] transformed into [x]
-
getQ
MatrixStore<N> getQ()
-
getR
MatrixStore<N> getR()
-
isOrdered
default boolean isOrdered()
Description copied from interface:MatrixDecomposition.OrderedThis is a property of the algorithm/implementation, not the data. Typically relevant forSingularValue,Eigenvalueor anyMatrixDecomposition.RankRevealingdecomposition.- Specified by:
isOrderedin interfaceMatrixDecomposition.Ordered<N extends java.lang.Comparable<N>>- Returns:
- true if the rows/columns of the returned matrix factors are guaranteed some specific order; false if there is no such guarantee.
-
reconstruct
default MatrixStore<N> reconstruct()
- Specified by:
reconstructin interfaceMatrixDecomposition<N extends java.lang.Comparable<N>>
-
updateColumn
default boolean updateColumn(int columnIndex, Access1D.Collectable<N,? super TransformableRegion<N>> newColumn)Description copied from interface:MatrixDecomposition.UpdatableUpdates the decomposition when a column in the original matrix is replaced.This method can only be called after an initial decomposition has been calculated.
If the updatable decomposition is a
MatrixDecomposition.Solverthen this method should only return true ifMatrixDecomposition.Solver.isSolvable()is true after the update.- Specified by:
updateColumnin interfaceMatrixDecomposition.Updatable<N extends java.lang.Comparable<N>>- Parameters:
columnIndex- The index of the column, in the original matrix, to replacenewColumn- The new column values- Returns:
- true if update was successful, false if not.
-
-