Eigen  5.0.1
 
Loading...
Searching...
No Matches
Eigen::RankRevealingBase< Derived > Class Template Reference

#include <Eigen/src/Core/RankRevealingBase.h>

Detailed Description

template<typename Derived>
class Eigen::RankRevealingBase< Derived >

CRTP mixin providing threshold management, rank computation, and rank-derived queries for rank-revealing decompositions (FullPivLU, ColPivHouseholderQR, FullPivHouseholderQR).

Template Parameters
Derivedthe concrete decomposition class (CRTP parameter)

The derived class must provide:

  • rows(), cols() (inherited from SolverBase)
  • m_isInitialized (bool member, also used by SolverBase)
  • pivotCoeff(Index i) returning the absolute value of the i-th pivot
+ Inheritance diagram for Eigen::RankRevealingBase< Derived >:

Public Member Functions

Index dimensionOfKernel () const
 
bool isInjective () const
 
bool isInvertible () const
 
bool isSurjective () const
 
RealScalar maxPivot () const
 
Index nonzeroPivots () const
 
Index rank () const
 
Derived & setThreshold (const RealScalar &threshold)
 
Derived & setThreshold (Default_t)
 
RealScalar threshold () const
 

Member Function Documentation

◆ dimensionOfKernel()

template<typename Derived>
Index Eigen::RankRevealingBase< Derived >::dimensionOfKernel ( ) const
inline
Returns
the dimension of the kernel of the matrix of which *this is the decomposition.
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling setThreshold(const RealScalar&).

◆ isInjective()

template<typename Derived>
bool Eigen::RankRevealingBase< Derived >::isInjective ( ) const
inline
Returns
true if the matrix of which *this is the decomposition represents an injective linear map, i.e. has trivial kernel; false otherwise.
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling setThreshold(const RealScalar&).

◆ isInvertible()

template<typename Derived>
bool Eigen::RankRevealingBase< Derived >::isInvertible ( ) const
inline
Returns
true if the matrix of which *this is the decomposition is invertible.
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling setThreshold(const RealScalar&).

◆ isSurjective()

template<typename Derived>
bool Eigen::RankRevealingBase< Derived >::isSurjective ( ) const
inline
Returns
true if the matrix of which *this is the decomposition represents a surjective linear map; false otherwise.
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling setThreshold(const RealScalar&).

◆ maxPivot()

template<typename Derived>
RealScalar Eigen::RankRevealingBase< Derived >::maxPivot ( ) const
inline
Returns
the absolute value of the biggest pivot, i.e. the biggest diagonal coefficient of U (or R).

◆ nonzeroPivots()

template<typename Derived>
Index Eigen::RankRevealingBase< Derived >::nonzeroPivots ( ) const
inline
Returns
the number of nonzero pivots in the decomposition. Here nonzero is meant in the exact sense, not in a fuzzy sense. So that notion isn't really intrinsically interesting, but it is still useful when implementing algorithms.
See also
rank()

◆ rank()

template<typename Derived>
Index Eigen::RankRevealingBase< Derived >::rank ( ) const
inline
Returns
the rank of the matrix of which *this is the decomposition.
Note
This method has to determine which pivots should be considered nonzero. For that, it uses the threshold value that you can control by calling setThreshold(const RealScalar&).

◆ setThreshold() [1/2]

template<typename Derived>
Derived & Eigen::RankRevealingBase< Derived >::setThreshold ( const RealScalar & threshold)
inline

Allows to prescribe a threshold to be used by certain methods, such as rank(), which need to determine when pivots are to be considered nonzero. This is not used for the 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
thresholdThe new value to use as the threshold.

A pivot will be considered nonzero if its absolute value is strictly greater than \( \vert pivot \vert \leqslant threshold \times \vert maxpivot \vert \) where maxpivot is the biggest pivot.

If you want to come back to the default behavior, call setThreshold(Default_t)

◆ setThreshold() [2/2]

template<typename Derived>
Derived & Eigen::RankRevealingBase< Derived >::setThreshold ( Default_t )
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.

dec.setThreshold(Eigen::Default);

See the documentation of setThreshold(const RealScalar&).

◆ threshold()

template<typename Derived>
RealScalar Eigen::RankRevealingBase< Derived >::threshold ( ) const
inline

Returns the threshold that will be used by certain methods such as rank().

See the documentation of setThreshold(const RealScalar&).


The documentation for this class was generated from the following file: