Eigen::SparseLUTransposeView< Conjugate, SparseLUType > Class Template Reference

#include <SparseLU.h>

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

Public Types

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

Public Member Functions

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

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
 

Member Typedef Documentation

◆ APIBase

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

◆ MatrixType

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

◆ OrderingType

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

◆ Scalar

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

◆ StorageIndex

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

Member Enumeration Documentation

◆ anonymous enum

template<bool Conjugate, class SparseLUType >
anonymous enum
Enumerator
ColsAtCompileTime 
MaxColsAtCompileTime 
38 { ColsAtCompileTime = MatrixType::ColsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime };
@ MaxColsAtCompileTime
Definition: SparseLU.h:38
@ ColsAtCompileTime
Definition: SparseLU.h:38

Constructor & Destructor Documentation

◆ SparseLUTransposeView() [1/2]

template<bool Conjugate, class SparseLUType >
Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::SparseLUTransposeView ( )
inline
40 : APIBase(), m_sparseLU(NULL) {}
SparseLUType * m_sparseLU
Definition: SparseLU.h:72
SparseSolverBase< SparseLUTransposeView< Conjugate, SparseLUType > > APIBase
Definition: SparseLU.h:29

◆ SparseLUTransposeView() [2/2]

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

References eigen_assert, EIGEN_STATIC_ASSERT, j, Eigen::SparseLUTransposeView< Conjugate, SparseLUType >::m_sparseLU, Eigen::RowMajorBit, Eigen::Success, and X.

◆ cols()

◆ operator=()

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

◆ rows()

◆ setIsInitialized()

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

◆ setSparseLU()

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

Member Data Documentation

◆ m_sparseLU


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