Eigen::SparseLUTransposeView< Conjugate, SparseLUType > Class Template Reference
+ Inheritance diagram for Eigen::SparseLUTransposeView< Conjugate, SparseLUType >:

Public Types

enum  {
  ColsAtCompileTime ,
  MaxColsAtCompileTime
}
 
typedef SparseLUType::MatrixType MatrixType
 
typedef SparseLUType::OrderingType OrderingType
 
typedef SparseLUType::Scalar Scalar
 
typedef SparseLUType::StorageIndex StorageIndex
 

Public Member Functions

template<typename Rhs , typename Dest >
bool _solve_impl (const MatrixBase< Rhs > &B, MatrixBase< Dest > &X_base) const
 
Index cols () const
 
Index rows () const
 
void setIsInitialized (const bool isInitialized)
 
void setSparseLU (SparseLUType *sparseLU)
 
 SparseLUTransposeView ()
 
 SparseLUTransposeView (const SparseLUTransposeView &view)
 
- Public Member Functions inherited from Eigen::SparseSolverBase< SparseLUTransposeView< Conjugate, SparseLUType > >
SparseLUTransposeView< Conjugate, SparseLUType > & derived ()
 
const SparseLUTransposeView< Conjugate, SparseLUType > & derived () const
 
const Solve< SparseLUTransposeView< Conjugate, SparseLUType >, Rhs > solve (const MatrixBase< Rhs > &b) const
 
const Solve< SparseLUTransposeView< Conjugate, SparseLUType >, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
 SparseSolverBase ()
 
 SparseSolverBase (SparseSolverBase &&other)
 
 ~SparseSolverBase ()
 

Protected Types

typedef SparseSolverBase< SparseLUTransposeView< Conjugate, SparseLUType > > APIBase
 

Private Member Functions

SparseLUTransposeViewoperator= (const SparseLUTransposeView &)
 

Private Attributes

SparseLUType * m_sparseLU
 

Additional Inherited Members

- Protected Attributes inherited from Eigen::SparseSolverBase< SparseLUTransposeView< Conjugate, SparseLUType > >
bool m_isInitialized
 

Detailed Description

template<bool Conjugate, class SparseLUType>
class Eigen::SparseLUTransposeView< Conjugate, SparseLUType >

Definition at line 24 of file SparseLU.h.

Member Typedef Documentation

◆ APIBase

template<bool Conjugate, class SparseLUType >
typedef SparseSolverBase<SparseLUTransposeView<Conjugate,SparseLUType> > Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::APIBase
protected

Definition at line 27 of file SparseLU.h.

◆ MatrixType

template<bool Conjugate, class SparseLUType >
typedef SparseLUType::MatrixType Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::MatrixType

Definition at line 32 of file SparseLU.h.

◆ OrderingType

template<bool Conjugate, class SparseLUType >
typedef SparseLUType::OrderingType Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::OrderingType

Definition at line 33 of file SparseLU.h.

◆ Scalar

template<bool Conjugate, class SparseLUType >
typedef SparseLUType::Scalar Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::Scalar

Definition at line 30 of file SparseLU.h.

◆ StorageIndex

template<bool Conjugate, class SparseLUType >
typedef SparseLUType::StorageIndex Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::StorageIndex

Definition at line 31 of file SparseLU.h.

Member Enumeration Documentation

◆ anonymous enum

template<bool Conjugate, class SparseLUType >
anonymous enum
Enumerator
ColsAtCompileTime 
MaxColsAtCompileTime 

Definition at line 35 of file SparseLU.h.

35  {
36  ColsAtCompileTime = MatrixType::ColsAtCompileTime,
37  MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
38  };

Constructor & Destructor Documentation

◆ SparseLUTransposeView() [1/2]

template<bool Conjugate, class SparseLUType >
Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::SparseLUTransposeView ( )
inline

Definition at line 40 of file SparseLU.h.

40 : APIBase(), m_sparseLU(NULL) {}
SparseLUType * m_sparseLU
Definition: SparseLU.h:76
SparseSolverBase< SparseLUTransposeView< Conjugate, SparseLUType > > APIBase
Definition: SparseLU.h:27

◆ SparseLUTransposeView() [2/2]

template<bool Conjugate, class SparseLUType >
Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::SparseLUTransposeView ( const SparseLUTransposeView< Conjugate, SparseLUType > &  view)
inline

Definition at line 41 of file SparseLU.h.

41  : APIBase() {
42  this->m_sparseLU = view.m_sparseLU;
43  this->m_isInitialized = view.m_isInitialized;
44  }

Member Function Documentation

◆ _solve_impl()

template<bool Conjugate, class SparseLUType >
template<typename Rhs , typename Dest >
bool Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::_solve_impl ( const MatrixBase< Rhs > &  B,
MatrixBase< Dest > &  X_base 
) const
inline

Definition at line 49 of file SparseLU.h.

50  {
51  Dest& X(X_base.derived());
52  eigen_assert(m_sparseLU->info() == Success && "The matrix should be factorized first");
53  EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,
54  THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);
55 
56 
57  // this ugly const_cast_derived() helps to detect aliasing when applying the permutations
58  for(Index j = 0; j < B.cols(); ++j){
59  X.col(j) = m_sparseLU->colsPermutation() * B.const_cast_derived().col(j);
60  }
61  //Forward substitution with transposed or adjoint of U
62  m_sparseLU->matrixU().template solveTransposedInPlace<Conjugate>(X);
63 
64  //Backward substitution with transposed or adjoint of L
65  m_sparseLU->matrixL().template solveTransposedInPlace<Conjugate>(X);
66 
67  // Permute back the solution
68  for (Index j = 0; j < B.cols(); ++j)
69  X.col(j) = m_sparseLU->rowsPermutation().transpose() * X.col(j);
70  return true;
71  }
MatrixXf B
#define eigen_assert(x)
Definition: Macros.h:902
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
@ Success
Definition: Constants.h:446
const unsigned int RowMajorBit
Definition: Constants.h:68
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
std::ptrdiff_t j

◆ cols()

template<bool Conjugate, class SparseLUType >
Index Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::cols ( void  ) const
inline

Definition at line 73 of file SparseLU.h.

73 { return m_sparseLU->cols(); }

◆ operator=()

template<bool Conjugate, class SparseLUType >
SparseLUTransposeView& Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::operator= ( const SparseLUTransposeView< Conjugate, SparseLUType > &  )
private

◆ rows()

template<bool Conjugate, class SparseLUType >
Index Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::rows ( void  ) const
inline

Definition at line 72 of file SparseLU.h.

72 { return m_sparseLU->rows(); }

◆ setIsInitialized()

template<bool Conjugate, class SparseLUType >
void Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::setIsInitialized ( const bool  isInitialized)
inline

Definition at line 45 of file SparseLU.h.

45 {this->m_isInitialized = isInitialized;}

◆ setSparseLU()

template<bool Conjugate, class SparseLUType >
void Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::setSparseLU ( SparseLUType *  sparseLU)
inline

Definition at line 46 of file SparseLU.h.

46 {m_sparseLU = sparseLU;}

Member Data Documentation

◆ m_sparseLU

template<bool Conjugate, class SparseLUType >
SparseLUType* Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::m_sparseLU
private

Definition at line 76 of file SparseLU.h.


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