![]() |
Prusa Slicer 2.6.0
|
LU decomposition of a matrix with complete pivoting, and related features. More...
#include <src/eigen/Eigen/src/LU/FullPivLU.h>
Inheritance diagram for Eigen::FullPivLU< _MatrixType >:
Collaboration diagram for Eigen::FullPivLU< _MatrixType >:Public Member Functions | |
| FullPivLU () | |
| Default Constructor. | |
| FullPivLU (Index rows, Index cols) | |
| Default Constructor with memory preallocation. | |
| template<typename InputType > | |
| FullPivLU (const EigenBase< InputType > &matrix) | |
| template<typename InputType > | |
| FullPivLU (EigenBase< InputType > &matrix) | |
| Constructs a LU factorization from a given matrix. | |
| template<typename InputType > | |
| FullPivLU & | compute (const EigenBase< InputType > &matrix) |
| const MatrixType & | matrixLU () const |
| Index | nonzeroPivots () const |
| RealScalar | maxPivot () const |
| EIGEN_DEVICE_FUNC const PermutationPType & | permutationP () const |
| const PermutationQType & | permutationQ () const |
| const internal::kernel_retval< FullPivLU > | kernel () const |
| const internal::image_retval< FullPivLU > | image (const MatrixType &originalMatrix) const |
| template<typename Rhs > | |
| const Solve< FullPivLU, Rhs > | solve (const MatrixBase< Rhs > &b) const |
| RealScalar | rcond () const |
| internal::traits< MatrixType >::Scalar | determinant () const |
| FullPivLU & | setThreshold (const RealScalar &threshold) |
| FullPivLU & | setThreshold (Default_t) |
| RealScalar | threshold () const |
| Index | rank () const |
| Index | dimensionOfKernel () const |
| bool | isInjective () const |
| bool | isSurjective () const |
| bool | isInvertible () const |
| const Inverse< FullPivLU > | inverse () const |
| MatrixType | reconstructedMatrix () const |
| EIGEN_DEVICE_FUNC Index | rows () const |
| EIGEN_DEVICE_FUNC Index | cols () const |
| template<typename RhsType , typename DstType > | |
| EIGEN_DEVICE_FUNC 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<typename RhsType , typename DstType > | |
| void | _solve_impl (const RhsType &rhs, DstType &dst) const |
| template<bool Conjugate, typename RhsType , typename DstType > | |
| void | _solve_impl_transposed (const RhsType &rhs, DstType &dst) const |
| ConstTransposeReturnType | transpose () const |
| AdjointReturnType | adjoint () const |
| EIGEN_DEVICE_FUNC FullPivLU< _MatrixType > & | derived () |
| EIGEN_DEVICE_FUNC const FullPivLU< _MatrixType > & | derived () const |
| EIGEN_DEVICE_FUNC Derived & | const_cast_derived () const |
| EIGEN_DEVICE_FUNC const Derived & | const_derived () const |
| EIGEN_DEVICE_FUNC Index | size () const |
| template<typename Dest > | |
| EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
| template<typename Dest > | |
| EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
| template<typename Dest > | |
| EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
| template<typename Dest > | |
| EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
| template<typename Dest > | |
| EIGEN_DEVICE_FUNC void | applyThisOnTheLeft (Dest &dst) const |
Protected Member Functions | |
| void | computeInPlace () |
Static Protected Member Functions | |
| static void | check_template_parameters () |
Protected Attributes | |
| MatrixType | m_lu |
| PermutationPType | m_p |
| PermutationQType | m_q |
| IntColVectorType | m_rowsTranspositions |
| IntRowVectorType | m_colsTranspositions |
| Index | m_nonzero_pivots |
| RealScalar | m_l1_norm |
| RealScalar | m_maxpivot |
| RealScalar | m_prescribedThreshold |
| signed char | m_det_pq |
| bool | m_isInitialized |
| bool | m_usePrescribedThreshold |
LU decomposition of a matrix with complete pivoting, and related features.
| _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
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:
Output:
This class supports the inplace decomposition mechanism.
|
inherited |
| typedef SolverBase<FullPivLU> Eigen::FullPivLU< _MatrixType >::Base |
|
inherited |
|
inherited |
|
inherited |
The interface type of indices.
To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.
| typedef internal::plain_col_type<MatrixType,StorageIndex>::type Eigen::FullPivLU< _MatrixType >::IntColVectorType |
| typedef internal::plain_row_type<MatrixType,StorageIndex>::type Eigen::FullPivLU< _MatrixType >::IntRowVectorType |
| typedef _MatrixType Eigen::FullPivLU< _MatrixType >::MatrixType |
| typedef PermutationMatrix<RowsAtCompileTime, MaxRowsAtCompileTime> Eigen::FullPivLU< _MatrixType >::PermutationPType |
| typedef PermutationMatrix<ColsAtCompileTime, MaxColsAtCompileTime> Eigen::FullPivLU< _MatrixType >::PermutationQType |
| typedef MatrixType::PlainObject Eigen::FullPivLU< _MatrixType >::PlainObject |
|
inherited |
|
inherited |
|
inherited |
| anonymous enum |
| Enumerator | |
|---|---|
| MaxRowsAtCompileTime | |
| MaxColsAtCompileTime | |
| Eigen::FullPivLU< MatrixType >::FullPivLU |
Default Constructor.
The default constructor is useful in cases in which the user intends to perform decompositions via LU::compute(const MatrixType&).
| Eigen::FullPivLU< MatrixType >::FullPivLU | ( | Index | rows, |
| Index | cols | ||
| ) |
Default Constructor with memory preallocation.
Like the default constructor but with preallocation of the internal data according to the specified problem size.
|
explicit |
Constructor.
| matrix | the matrix of which to compute the LU decomposition. It is required to be nonzero. |
References Eigen::FullPivLU< _MatrixType >::compute(), and Eigen::EigenBase< Derived >::derived().
Here is the call graph for this function:
|
explicit |
Constructs a LU factorization from a given matrix.
This overloaded constructor is provided for inplace decomposition when MatrixType is a Eigen::Ref.
References Eigen::FullPivLU< _MatrixType >::computeInPlace().
Here is the call graph for this function:| EIGEN_DEVICE_FUNC void Eigen::FullPivLU< _MatrixType >::_solve_impl | ( | const RhsType & | rhs, |
| DstType & | dst | ||
| ) | const |
| void Eigen::FullPivLU< _MatrixType >::_solve_impl | ( | const RhsType & | rhs, |
| DstType & | dst | ||
| ) | const |
References eigen_assert.
| EIGEN_DEVICE_FUNC void Eigen::FullPivLU< _MatrixType >::_solve_impl_transposed | ( | const RhsType & | rhs, |
| DstType & | dst | ||
| ) | const |
| void Eigen::FullPivLU< _MatrixType >::_solve_impl_transposed | ( | const RhsType & | rhs, |
| DstType & | dst | ||
| ) | const |
References eigen_assert, Eigen::PermutationMatrix< SizeAtCompileTime, MaxSizeAtCompileTime, _StorageIndex >::indices(), and Eigen::PermutationBase< Derived >::inverse().
Here is the call graph for this function:
|
inlineinherited |
|
inlineinherited |
A typical usage is to solve for the adjoint problem A' x = b:
For real scalar types, this function is equivalent to transpose().
|
inlineinherited |
References Eigen::EigenBase< Derived >::derived().
Here is the call graph for this function:
|
inlineinherited |
References Eigen::EigenBase< Derived >::derived().
Here is the call graph for this function:
|
inlinestaticprotected |
References EIGEN_STATIC_ASSERT_NON_INTEGER.
|
inline |
References Eigen::FullPivLU< _MatrixType >::m_lu.
Referenced by Eigen::FullPivLU< _MatrixType >::dimensionOfKernel(), and Eigen::FullPivLU< _MatrixType >::isInjective().
Here is the caller graph for this function:
|
inline |
Computes the LU decomposition of the given matrix.
| matrix | the matrix of which to compute the LU decomposition. It is required to be nonzero. |
References Eigen::FullPivLU< _MatrixType >::computeInPlace(), Eigen::EigenBase< Derived >::derived(), and Eigen::FullPivLU< _MatrixType >::m_lu.
Referenced by Eigen::FullPivLU< _MatrixType >::FullPivLU().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
References eigen_assert.
Referenced by Eigen::FullPivLU< _MatrixType >::FullPivLU(), and Eigen::FullPivLU< _MatrixType >::compute().
Here is the caller graph for this function:
|
inlineinherited |
Referenced by Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::swap().
Here is the caller graph for this function:
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
| internal::traits< MatrixType >::Scalar Eigen::FullPivLU< MatrixType >::determinant |
References eigen_assert.
|
inline |
References Eigen::FullPivLU< _MatrixType >::cols(), eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::rank().
Here is the call graph for this function:
|
inlineinherited |
Referenced by Eigen::EigenBase< Derived >::subTo().
Here is the caller graph for this function:
|
inline |
| originalMatrix | the original matrix, of which *this is the LU decomposition. The reason why it is needed to pass it here, is that this allows a large optimization, as otherwise this method would need to reconstruct it from the LU decomposition. |
Example:
Output:
References eigen_assert, and Eigen::FullPivLU< _MatrixType >::m_isInitialized.
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::m_lu.
|
inline |
References Eigen::FullPivLU< _MatrixType >::cols(), eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::rank().
Referenced by Eigen::FullPivLU< _MatrixType >::isInvertible().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::isInjective(), Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::m_lu.
Here is the call graph for this function:
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, Eigen::FullPivLU< _MatrixType >::rank(), and Eigen::FullPivLU< _MatrixType >::rows().
Here is the call graph for this function:
|
inline |
Example:
Output:
References eigen_assert, and Eigen::FullPivLU< _MatrixType >::m_isInitialized.
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::m_lu.
|
inline |
References Eigen::FullPivLU< _MatrixType >::m_maxpivot.
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::m_nonzero_pivots.
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::m_p.
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, and Eigen::FullPivLU< _MatrixType >::m_q.
|
inline |
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, Eigen::FullPivLU< _MatrixType >::m_lu, Eigen::FullPivLU< _MatrixType >::m_maxpivot, Eigen::FullPivLU< _MatrixType >::m_nonzero_pivots, and Eigen::FullPivLU< _MatrixType >::threshold().
Referenced by Eigen::FullPivLU< _MatrixType >::dimensionOfKernel(), Eigen::FullPivLU< _MatrixType >::isInjective(), and Eigen::FullPivLU< _MatrixType >::isSurjective().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
*this is the LU decomposition. References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, Eigen::FullPivLU< _MatrixType >::m_l1_norm, and Eigen::internal::rcond_estimate_helper().
Here is the call graph for this function:| MatrixType Eigen::FullPivLU< MatrixType >::reconstructedMatrix |
References eigen_assert.
|
inline |
References Eigen::FullPivLU< _MatrixType >::m_lu.
Referenced by Eigen::FullPivLU< _MatrixType >::isSurjective().
Here is the caller graph for this function:
|
inline |
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.
| threshold | The new value to use as the threshold. |
A pivot will be considered nonzero if its absolute value is strictly greater than
If you want to come back to the default behavior, call setThreshold(Default_t)
References Eigen::FullPivLU< _MatrixType >::m_prescribedThreshold, Eigen::FullPivLU< _MatrixType >::m_usePrescribedThreshold, and Eigen::FullPivLU< _MatrixType >::threshold().
Here is the call graph for this function:
|
inline |
Allows to come back to the default behavior, letting Eigen use its default formula for determining the threshold.
You should pass the special object Eigen::Default as parameter here.
See the documentation of setThreshold(const RealScalar&).
References Eigen::FullPivLU< _MatrixType >::m_usePrescribedThreshold.
|
inlineinherited |
References Eigen::EigenBase< Derived >::cols(), and Eigen::EigenBase< Derived >::rows().
Referenced by Eigen::PlainObjectBase< Derived >::_resize_to_match(), Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::resize(), Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setIdentity(), and Eigen::DiagonalMatrix< _Scalar, SizeAtCompileTime, MaxSizeAtCompileTime >::setZero().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| b | the right-hand-side of the equation to solve. Can be a vector or a matrix, the only requirement in order for the equation to make sense is that b.rows()==A.rows(), where A is the matrix of which *this is the LU decomposition. |
\note_about_checking_solutions
\note_about_arbitrary_choice_of_solution \note_about_using_kernel_to_study_multiple_solutions
Example:
Output:
References eigen_assert, and Eigen::FullPivLU< _MatrixType >::m_isInitialized.
|
inlineinherited |
References Eigen::EigenBase< Derived >::cols(), Eigen::EigenBase< Derived >::evalTo(), and Eigen::EigenBase< Derived >::rows().
Here is the call graph for this function:
|
inline |
Returns the threshold that will be used by certain methods such as rank().
See the documentation of setThreshold(const RealScalar&).
References eigen_assert, Eigen::FullPivLU< _MatrixType >::m_isInitialized, Eigen::FullPivLU< _MatrixType >::m_lu, Eigen::FullPivLU< _MatrixType >::m_prescribedThreshold, and Eigen::FullPivLU< _MatrixType >::m_usePrescribedThreshold.
Referenced by Eigen::FullPivLU< _MatrixType >::rank(), and Eigen::FullPivLU< _MatrixType >::setThreshold().
Here is the caller graph for this function:
|
inlineinherited |
A typical usage is to solve for the transposed problem A^T x = b:
|
protected |
|
protected |
|
protected |
Referenced by Eigen::FullPivLU< _MatrixType >::dimensionOfKernel(), Eigen::FullPivLU< _MatrixType >::image(), Eigen::FullPivLU< _MatrixType >::inverse(), Eigen::FullPivLU< _MatrixType >::isInjective(), Eigen::FullPivLU< _MatrixType >::isInvertible(), Eigen::FullPivLU< _MatrixType >::isSurjective(), Eigen::FullPivLU< _MatrixType >::kernel(), Eigen::FullPivLU< _MatrixType >::matrixLU(), Eigen::FullPivLU< _MatrixType >::nonzeroPivots(), Eigen::FullPivLU< _MatrixType >::permutationP(), Eigen::FullPivLU< _MatrixType >::permutationQ(), Eigen::FullPivLU< _MatrixType >::rank(), Eigen::FullPivLU< _MatrixType >::rcond(), Eigen::FullPivLU< _MatrixType >::solve(), and Eigen::FullPivLU< _MatrixType >::threshold().
|
protected |
Referenced by Eigen::FullPivLU< _MatrixType >::rcond().
|
protected |
Referenced by Eigen::FullPivLU< _MatrixType >::cols(), Eigen::FullPivLU< _MatrixType >::compute(), Eigen::FullPivLU< _MatrixType >::inverse(), Eigen::FullPivLU< _MatrixType >::isInvertible(), Eigen::FullPivLU< _MatrixType >::matrixLU(), Eigen::FullPivLU< _MatrixType >::rank(), Eigen::FullPivLU< _MatrixType >::rows(), and Eigen::FullPivLU< _MatrixType >::threshold().
|
protected |
Referenced by Eigen::FullPivLU< _MatrixType >::maxPivot(), and Eigen::FullPivLU< _MatrixType >::rank().
|
protected |
|
protected |
Referenced by Eigen::FullPivLU< _MatrixType >::permutationP().
|
protected |
|
protected |
Referenced by Eigen::FullPivLU< _MatrixType >::permutationQ().
|
protected |
|
protected |