|
template<typename RhsType , typename DstType > |
EIGEN_DEVICE_FUNC void | _solve_impl (const RhsType &rhs, DstType &dst) const |
|
template<typename RhsType , typename DstType > |
void | _solve_impl (const RhsType &rhs, DstType &dst) const |
|
template<bool Conjugate, typename RhsType , typename DstType > |
EIGEN_DEVICE_FUNC void | _solve_impl_transposed (const RhsType &rhs, DstType &dst) const |
|
template<bool Conjugate, typename RhsType , typename DstType > |
void | _solve_impl_transposed (const RhsType &rhs, DstType &dst) const |
|
EIGEN_DEVICE_FUNC Index | cols () const |
|
template<typename InputType > |
FullPivLU & | compute (const EigenBase< InputType > &matrix) |
|
internal::traits< MatrixType >::Scalar | determinant () const |
|
Index | dimensionOfKernel () const |
|
| FullPivLU () |
| Default Constructor. More...
|
|
| FullPivLU (Index rows, Index cols) |
| Default Constructor with memory preallocation. More...
|
|
template<typename InputType > |
| FullPivLU (const EigenBase< InputType > &matrix) |
|
template<typename InputType > |
| FullPivLU (EigenBase< InputType > &matrix) |
| Constructs a LU factorization from a given matrix. More...
|
|
const internal::image_retval< FullPivLU > | image (const MatrixType &originalMatrix) const |
|
const Inverse< FullPivLU > | inverse () const |
|
bool | isInjective () const |
|
bool | isInvertible () const |
|
bool | isSurjective () const |
|
const internal::kernel_retval< FullPivLU > | kernel () const |
|
const MatrixType & | matrixLU () const |
|
RealScalar | maxPivot () const |
|
Index | nonzeroPivots () const |
|
EIGEN_DEVICE_FUNC const PermutationPType & | permutationP () const |
|
const PermutationQType & | permutationQ () const |
|
Index | rank () const |
|
RealScalar | rcond () const |
|
MatrixType | reconstructedMatrix () const |
|
EIGEN_DEVICE_FUNC Index | rows () const |
|
FullPivLU & | setThreshold (const RealScalar &threshold) |
|
FullPivLU & | setThreshold (Default_t) |
|
template<typename Rhs > |
const Solve< FullPivLU, Rhs > | solve (const MatrixBase< Rhs > &b) const |
|
RealScalar | threshold () const |
|
AdjointReturnType | adjoint () const |
|
const Solve< FullPivLU< _MatrixType >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
|
| SolverBase () |
|
ConstTransposeReturnType | transpose () const |
|
| ~SolverBase () |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | applyThisOnTheLeft (Dest &dst) const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
|
EIGEN_DEVICE_FUNC Index | cols () const |
|
EIGEN_DEVICE_FUNC Derived & | const_cast_derived () const |
|
EIGEN_DEVICE_FUNC const Derived & | const_derived () const |
|
EIGEN_DEVICE_FUNC Derived & | derived () |
|
EIGEN_DEVICE_FUNC const Derived & | derived () const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
|
EIGEN_DEVICE_FUNC Index | rows () const |
|
EIGEN_DEVICE_FUNC Index | size () const |
|
template<typename Dest > |
EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
|
template<typename _MatrixType>
class Eigen::FullPivLU< _MatrixType >
LU decomposition of a matrix with complete pivoting, and related features.
- Template Parameters
-
_MatrixType | the type of the matrix of which we are computing the LU decomposition |
This class represents a LU decomposition of any matrix, with complete pivoting: the matrix A is decomposed as
where L is unit-lower-triangular, U is upper-triangular, and P and Q are permutation matrices. This is a rank-revealing LU decomposition. The eigenvalues (diagonal coefficients) of U are sorted in such a way that any zeros are at the end.
This decomposition provides the generic approach to solving systems of linear equations, computing the rank, invertibility, inverse, kernel, and determinant.
This LU decomposition is very stable and well tested with large matrices. However there are use cases where the SVD decomposition is inherently more stable and/or flexible. For example, when computing the kernel of a matrix, working with the SVD allows to select the smallest singular values of the matrix, something that the LU decomposition doesn't see.
The data of the LU decomposition can be directly accessed through the methods matrixLU(), permutationP(), permutationQ().
As an exemple, here is how the original matrix can be retrieved:
Matrix5x3 m = Matrix5x3::Random();
cout << "Here is the matrix m:" << endl << m << endl;
cout << "Here is, up to permutations, its LU decomposition matrix:"
<< endl <<
lu.matrixLU() << endl;
cout << "Here is the L part:" << endl;
Matrix5x5
l = Matrix5x5::Identity();
l.block<5,3>(0,0).triangularView<StrictlyLower>() =
lu.matrixLU();
cout << l << endl;
cout << "Here is the U part:" << endl;
Matrix5x3 u =
lu.matrixLU().triangularView<
Upper>();
cout << u << endl;
cout << "Let us now reconstruct the original matrix m:" << endl;
cout <<
lu.permutationP().inverse() * l * u *
lu.permutationQ().inverse() << endl;
Output:
This class supports the inplace decomposition mechanism.
- See also
- MatrixBase::fullPivLu(), MatrixBase::determinant(), MatrixBase::inverse()
Definition at line 249 of file ForwardDeclarations.h.
template<typename _MatrixType>
Allows to prescribe a threshold to be used by certain methods, such as rank(), who need to determine when pivots are to be considered nonzero. This is not used for the LU decomposition itself.
When it needs to get the threshold value, Eigen calls threshold(). By default, this uses a formula to automatically determine a reasonable threshold. Once you have called the present method setThreshold(const RealScalar&), your value is used instead.
- Parameters
-
threshold | The new value to use as the threshold. |
A pivot will be considered nonzero if its absolute value is strictly greater than
where maxpivot is the biggest pivot.
If you want to come back to the default behavior, call setThreshold(Default_t)
Definition at line 292 of file FullPivLU.h.