Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::SolverBase< Derived > Class Template Reference

A base class for matrix decomposition and solvers. More...

#include <src/eigen/Eigen/src/Core/SolverBase.h>

+ Inheritance diagram for Eigen::SolverBase< Derived >:
+ Collaboration diagram for Eigen::SolverBase< Derived >:

Public Types

enum  {
  RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime , ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime , SizeAtCompileTime , MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime ,
  MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime , MaxSizeAtCompileTime , IsVectorAtCompileTime
}
 
typedef EigenBase< Derived > Base
 
typedef internal::traits< Derived >::Scalar Scalar
 
typedef Scalar CoeffReturnType
 
typedef internal::add_const< Transpose< constDerived > >::type ConstTransposeReturnType
 
typedef internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, ConstTransposeReturnType >, ConstTransposeReturnType >::type AdjointReturnType
 
typedef Eigen::Index Index
 The interface type of indices.
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

 SolverBase ()
 
 ~SolverBase ()
 
template<typename Rhs >
const Solve< Derived, Rhs > solve (const MatrixBase< Rhs > &b) const
 
ConstTransposeReturnType transpose () const
 
AdjointReturnType adjoint () const
 
EIGEN_DEVICE_FUNC Derived & derived ()
 
EIGEN_DEVICE_FUNC const Derived & derived () const
 
EIGEN_DEVICE_FUNC Derived & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () const
 
EIGEN_DEVICE_FUNC Index rows () const
 
EIGEN_DEVICE_FUNC Index cols () 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
 

Detailed Description

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

A base class for matrix decomposition and solvers.

Template Parameters
Derivedthe actual type of the decomposition/solver.

Any matrix decomposition inheriting this base class provide the following API:

MatrixType A, b, x;
DecompositionType dec(A);
x = dec.solve(b); // solve A * x = b
x = dec.transpose().solve(b); // solve A^T * x = b
x = dec.adjoint().solve(b); // solve A' * x = b
Warning
Currently, any other usage of transpose() and adjoint() are not supported and will produce compilation errors.
See also
class PartialPivLU, class FullPivLU

Member Typedef Documentation

◆ AdjointReturnType

◆ Base

template<typename Derived >
typedef EigenBase<Derived> Eigen::SolverBase< Derived >::Base

◆ CoeffReturnType

template<typename Derived >
typedef Scalar Eigen::SolverBase< Derived >::CoeffReturnType

◆ ConstTransposeReturnType

template<typename Derived >
typedef internal::add_const<Transpose<constDerived>>::type Eigen::SolverBase< Derived >::ConstTransposeReturnType

◆ Index

template<typename Derived >
typedef Eigen::Index Eigen::EigenBase< Derived >::Index
inherited

The interface type of indices.

To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.

See also
StorageIndex, TopicPreprocessorDirectives.

◆ Scalar

template<typename Derived >
typedef internal::traits<Derived>::Scalar Eigen::SolverBase< Derived >::Scalar

◆ StorageKind

template<typename Derived >
typedef internal::traits<Derived>::StorageKind Eigen::EigenBase< Derived >::StorageKind
inherited

Member Enumeration Documentation

◆ anonymous enum

template<typename Derived >
anonymous enum
Enumerator
RowsAtCompileTime 
ColsAtCompileTime 
SizeAtCompileTime 
MaxRowsAtCompileTime 
MaxColsAtCompileTime 
MaxSizeAtCompileTime 
IsVectorAtCompileTime 
49 {
50 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
51 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
52 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
53 internal::traits<Derived>::ColsAtCompileTime>::ret),
54 MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
55 MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
56 MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
57 internal::traits<Derived>::MaxColsAtCompileTime>::ret),
58 IsVectorAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime == 1
59 || internal::traits<Derived>::MaxColsAtCompileTime == 1
60 };
@ RowsAtCompileTime
Definition SolverBase.h:50
@ ColsAtCompileTime
Definition SolverBase.h:51
@ MaxRowsAtCompileTime
Definition SolverBase.h:54
@ IsVectorAtCompileTime
Definition SolverBase.h:58
@ MaxSizeAtCompileTime
Definition SolverBase.h:56
@ MaxColsAtCompileTime
Definition SolverBase.h:55
@ SizeAtCompileTime
Definition SolverBase.h:52

Constructor & Destructor Documentation

◆ SolverBase()

template<typename Derived >
Eigen::SolverBase< Derived >::SolverBase ( )
inline

Default constructor

64 {}

◆ ~SolverBase()

template<typename Derived >
Eigen::SolverBase< Derived >::~SolverBase ( )
inline
67 {}

Member Function Documentation

◆ addTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::addTo ( Dest &  dst) const
inlineinherited
78 {
79 // This is the default implementation,
80 // derived class can reimplement it in a more optimized way.
81 typename Dest::PlainObject res(rows(),cols());
82 evalTo(res);
83 dst += res;
84 }
EIGEN_DEVICE_FUNC Index cols() const
Definition EigenBase.h:62
EIGEN_DEVICE_FUNC Index rows() const
Definition EigenBase.h:59
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition EigenBase.h:71

◆ adjoint()

template<typename Derived >
AdjointReturnType Eigen::SolverBase< Derived >::adjoint ( ) const
inline
Returns
an expression of the adjoint of the factored matrix

A typical usage is to solve for the adjoint problem A' x = b:

x = dec.adjoint().solve(b);

For real scalar types, this function is equivalent to transpose().

See also
transpose(), solve()
110 {
112 }
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, ConstTransposeReturnType >, ConstTransposeReturnType >::type AdjointReturnType
Definition SolverBase.h:99
ConstTransposeReturnType transpose() const
Definition SolverBase.h:90
EIGEN_DEVICE_FUNC Derived & derived()
Definition EigenBase.h:45

References Eigen::SolverBase< Derived >::derived(), and Eigen::SolverBase< Derived >::transpose().

+ Here is the call graph for this function:

◆ applyThisOnTheLeft()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheLeft ( Dest &  dst) const
inlineinherited
110 {
111 // This is the default implementation,
112 // derived class can reimplement it in a more optimized way.
113 dst = this->derived() * dst;
114 }
EIGEN_DEVICE_FUNC Derived & derived()
Definition EigenBase.h:45

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ applyThisOnTheRight()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheRight ( Dest &  dst) const
inlineinherited
101 {
102 // This is the default implementation,
103 // derived class can reimplement it in a more optimized way.
104 dst = dst * this->derived();
105 }

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ cols()

template<typename Derived >
EIGEN_DEVICE_FUNC Index Eigen::EigenBase< Derived >::cols ( ) const
inlineinherited
Returns
the number of columns.
See also
rows(), ColsAtCompileTime
62{ return derived().cols(); }

References Eigen::EigenBase< Derived >::derived().

Referenced by Eigen::PlainObjectBase< Derived >::_resize_to_match(), Eigen::ComplexEigenSolver< _MatrixType >::compute(), Eigen::EigenSolver< _MatrixType >::compute(), Eigen::ComplexSchur< _MatrixType >::compute(), Eigen::RealSchur< _MatrixType >::compute(), Eigen::EigenBase< Derived >::size(), and Eigen::EigenBase< Derived >::subTo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ const_cast_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC Derived & Eigen::EigenBase< Derived >::const_cast_derived ( ) const
inlineinherited
52 { return *static_cast<Derived*>(const_cast<EigenBase*>(this)); }

Referenced by Eigen::TriangularViewImpl< _MatrixType, _Mode, Dense >::swap().

+ Here is the caller graph for this function:

◆ const_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC const Derived & Eigen::EigenBase< Derived >::const_derived ( ) const
inlineinherited
55 { return *static_cast<const Derived*>(this); }

◆ derived() [1/2]

template<typename Derived >
EIGEN_DEVICE_FUNC Derived & Eigen::EigenBase< Derived >::derived ( )
inline
Returns
a reference to the derived object
45{ return *static_cast<Derived*>(this); }

Referenced by Eigen::SolverBase< Derived >::adjoint(), Eigen::SolverBase< Derived >::solve(), and Eigen::SolverBase< Derived >::transpose().

+ Here is the caller graph for this function:

◆ derived() [2/2]

template<typename Derived >
EIGEN_DEVICE_FUNC const Derived & Eigen::EigenBase< Derived >::derived ( ) const
inline
Returns
a const reference to the derived object
48{ return *static_cast<const Derived*>(this); }

◆ evalTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::evalTo ( Dest &  dst) const
inlineinherited
72 { derived().evalTo(dst); }

Referenced by Eigen::EigenBase< Derived >::subTo().

+ Here is the caller graph for this function:

◆ rows()

◆ size()

template<typename Derived >
EIGEN_DEVICE_FUNC Index Eigen::EigenBase< Derived >::size ( ) const
inlineinherited
Returns
the number of coefficients, which is rows()*cols().
See also
rows(), cols(), SizeAtCompileTime.
66{ return rows() * cols(); }

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:

◆ solve()

template<typename Derived >
template<typename Rhs >
const Solve< Derived, Rhs > Eigen::SolverBase< Derived >::solve ( const MatrixBase< Rhs > &  b) const
inline
Returns
an expression of the solution x of $ A x = b $ using the current decomposition of A.
76 {
77 eigen_assert(derived().rows()==b.rows() && "solve(): invalid number of rows of the right hand side matrix b");
78 return Solve<Derived, Rhs>(derived(), b.derived());
79 }
#define eigen_assert(x)
Definition Macros.h:579

References Eigen::SolverBase< Derived >::derived(), eigen_assert, and Eigen::EigenBase< Derived >::rows().

+ Here is the call graph for this function:

◆ subTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::subTo ( Dest &  dst) const
inlineinherited
90 {
91 // This is the default implementation,
92 // derived class can reimplement it in a more optimized way.
93 typename Dest::PlainObject res(rows(),cols());
94 evalTo(res);
95 dst -= res;
96 }

References Eigen::EigenBase< Derived >::cols(), Eigen::EigenBase< Derived >::evalTo(), and Eigen::EigenBase< Derived >::rows().

+ Here is the call graph for this function:

◆ transpose()

template<typename Derived >
ConstTransposeReturnType Eigen::SolverBase< Derived >::transpose ( ) const
inline
Returns
an expression of the transposed of the factored matrix.

A typical usage is to solve for the transposed problem A^T x = b:

x = dec.transpose().solve(b);
See also
adjoint(), solve()
91 {
93 }
internal::add_const< Transpose< constDerived > >::type ConstTransposeReturnType
Definition SolverBase.h:82

References Eigen::SolverBase< Derived >::derived().

Referenced by Eigen::SolverBase< Derived >::adjoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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