10 #ifndef EIGEN_SOLVETRIANGULAR_H    11 #define EIGEN_SOLVETRIANGULAR_H    19 template<
typename LhsScalar, 
typename RhsScalar, 
typename Index, 
int S
ide, 
int Mode, 
bool Conjugate, 
int StorageOrder>
    22 template <
typename Scalar, 
typename Index, 
int S
ide, 
int Mode, 
bool Conjugate, 
int TriStorageOrder, 
int OtherStorageOrder>
    26 template<
typename Lhs, 
typename Rhs, 
int S
ide>
    41 template<
typename Lhs, 
typename Rhs,
    49 template<
typename Lhs, 
typename Rhs, 
int S
ide, 
int Mode>
    57   static void run(
const Lhs& lhs, Rhs& rhs)
    59     ActualLhsType actualLhs = LhsProductTraits::extract(lhs);
    63     bool useRhsDirectly = Rhs::InnerStrideAtCompileTime==1 || rhs.innerStride()==1;
    66                                                   (useRhsDirectly ? rhs.data() : 0));
    69       MappedRhs(actualRhs,rhs.size()) = rhs;
    73       ::run(actualLhs.cols(), actualLhs.data(), actualLhs.outerStride(), actualRhs);
    76       rhs = MappedRhs(actualRhs, rhs.size());
    81 template<
typename Lhs, 
typename Rhs, 
int S
ide, 
int Mode>
    88   static void run(
const Lhs& lhs, Rhs& rhs)
    92     const Index size = lhs.rows();
    96               Rhs::MaxRowsAtCompileTime, Rhs::MaxColsAtCompileTime, Lhs::MaxRowsAtCompileTime,4> BlockingType;
    98     BlockingType blocking(rhs.rows(), rhs.cols(), size, 1, 
false);
   102       ::run(size, othersize, &actualLhs.coeffRef(0,0), actualLhs.outerStride(), &rhs.coeffRef(0,0), rhs.outerStride(), blocking);
   110 template<
typename Lhs, 
typename Rhs, 
int Mode, 
int LoopIndex, 
int Size,
   111          bool Stop = LoopIndex==Size>
   114 template<
typename Lhs, 
typename Rhs, 
int Mode, 
int LoopIndex, 
int Size>
   118     DiagIndex  = IsLower ? LoopIndex : Size - LoopIndex - 1,
   119     StartIndex = IsLower ? 0         : DiagIndex+1
   121   static void run(
const Lhs& lhs, Rhs& rhs)
   124       rhs.coeffRef(DiagIndex) -= lhs.row(DiagIndex).template segment<LoopIndex>(StartIndex).transpose()
   125                                 .cwiseProduct(rhs.template segment<LoopIndex>(StartIndex)).sum();
   128       rhs.coeffRef(DiagIndex) /= lhs.coeff(DiagIndex,DiagIndex);
   134 template<
typename Lhs, 
typename Rhs, 
int Mode, 
int LoopIndex, 
int Size>
   136   static void run(
const Lhs&, Rhs&) {}
   139 template<
typename Lhs, 
typename Rhs, 
int Mode>
   141   static void run(
const Lhs& lhs, Rhs& rhs)
   145 template<
typename Lhs, 
typename Rhs, 
int Mode>
   147   static void run(
const Lhs& lhs, Rhs& rhs)
   154                               0,Rhs::SizeAtCompileTime>::run(trLhs,trRhs);
   164 template<
typename MatrixType, 
unsigned int Mode>
   165 template<
int S
ide, 
typename OtherDerived>
   168   OtherDerived& other = _other.const_cast_derived();
   169   eigen_assert( derived().cols() == derived().rows() && ((Side==
OnTheLeft && derived().cols() == other.rows()) || (Side==
OnTheRight && derived().cols() == other.cols())) );
   175   OtherCopy otherCopy(other);
   178     Side, Mode>::run(derived().nestedExpression(), otherCopy);
   184 template<
typename Derived, 
unsigned int Mode>
   185 template<
int S
ide, 
typename Other>
   195 template<
int S
ide, 
typename TriangularType, 
typename Rhs>
   202  : 
public ReturnByValue<triangular_solve_retval<Side, TriangularType, Rhs> >
   208     : m_triangularMatrix(tri), m_rhs(rhs)
   214   template<
typename Dest> 
inline void evalTo(Dest& dst)
 const   218     m_triangularMatrix.template solveInPlace<Side>(dst);
   230 #endif // EIGEN_SOLVETRIANGULAR_H static void run(const Lhs &, Rhs &)
bool is_same_dense(const T1 &mat1, const T2 &mat2, typename enable_if< has_direct_access< T1 >::ret &&has_direct_access< T2 >::ret, T1 >::type *=0)
A matrix or vector expression mapping an existing array of data. 
Expression of the transpose of a matrix. 
static void run(const Lhs &lhs, Rhs &rhs)
const unsigned int RowMajorBit
Map< Matrix< RhsScalar, Dynamic, 1 >, Aligned > MappedRhs
blas_traits< Lhs > LhsProductTraits
LhsProductTraits::DirectLinearAccessType ActualLhsType
static void run(const Lhs &lhs, Rhs &rhs)
ReturnByValue< triangular_solve_retval > Base
triangular_solve_retval(const TriangularType &tri, const Rhs &rhs)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API. 
blas_traits< Lhs > LhsProductTraits
void evalTo(Dest &dst) const
#define ei_declare_aligned_stack_constructed_variable(TYPE, NAME, SIZE, BUFFER)
const TriangularType & m_triangularMatrix
static void run(const Lhs &lhs, Rhs &rhs)
LhsProductTraits::ExtractType ActualLhsType
remove_all< typename Rhs::Nested >::type RhsNestedCleaned
static void run(const Lhs &lhs, Rhs &rhs)
internal::plain_matrix_type_column_major< Rhs >::type ReturnType
The matrix class, also used for vectors and row-vectors. 
Base class for all dense matrices, vectors, and expressions. 
static void run(const Lhs &lhs, Rhs &rhs)
const XprType & ExtractType