11 #ifndef EIGEN_TRIANGULARMATRIX_H
12 #define EIGEN_TRIANGULARMATRIX_H
18 template<
int S
ide,
typename TriangularType,
typename Rhs>
struct triangular_solve_retval;
32 Mode = internal::traits<Derived>::Mode,
33 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
34 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
35 MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
36 MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
38 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
39 internal::traits<Derived>::ColsAtCompileTime>::ret),
44 MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
45 internal::traits<Derived>::MaxColsAtCompileTime>::ret)
48 typedef typename internal::traits<Derived>::Scalar Scalar;
49 typedef typename internal::traits<Derived>::StorageKind StorageKind;
50 typedef typename internal::traits<Derived>::StorageIndex StorageIndex;
51 typedef typename internal::traits<Derived>::FullMatrixType DenseMatrixType;
52 typedef DenseMatrixType DenseType;
53 typedef Derived
const& Nested;
63 inline Index outerStride()
const {
return derived().outerStride(); }
65 inline Index innerStride()
const {
return derived().innerStride(); }
70 EIGEN_UNUSED_VARIABLE(rows);
71 EIGEN_UNUSED_VARIABLE(cols);
72 eigen_assert(rows==this->rows() && cols==this->cols());
76 inline Scalar coeff(
Index row,
Index col)
const {
return derived().coeff(row,col); }
78 inline Scalar& coeffRef(
Index row,
Index col) {
return derived().coeffRef(row,col); }
82 template<
typename Other>
86 derived().coeffRef(row, col) = other.coeff(row, col);
90 inline Scalar operator()(
Index row,
Index col)
const
92 check_coordinates(row, col);
93 return coeff(row,col);
96 inline Scalar& operator()(
Index row,
Index col)
98 check_coordinates(row, col);
99 return coeffRef(row,col);
102 #ifndef EIGEN_PARSED_BY_DOXYGEN
104 inline const Derived&
derived()
const {
return *
static_cast<const Derived*
>(
this); }
106 inline Derived&
derived() {
return *
static_cast<Derived*
>(
this); }
109 template<
typename DenseDerived>
112 template<
typename DenseDerived>
117 DenseMatrixType toDenseMatrix()
const
119 DenseMatrixType res(rows(), cols());
126 void check_coordinates(
Index row,
Index col)
const
128 EIGEN_ONLY_USED_FOR_DEBUG(row);
129 EIGEN_ONLY_USED_FOR_DEBUG(col);
130 eigen_assert(col>=0 && col<cols() && row>=0 && row<rows());
132 EIGEN_ONLY_USED_FOR_DEBUG(mode);
133 eigen_assert((mode==
Upper && col>=row)
134 || (mode==
Lower && col<=row)
139 #ifdef EIGEN_INTERNAL_DEBUGGING
140 void check_coordinates_internal(
Index row,
Index col)
const
142 check_coordinates(row, col);
145 void check_coordinates_internal(
Index ,
Index )
const {}
168 template<
typename MatrixType,
unsigned int _Mode>
169 struct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType>
171 typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
172 typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
173 typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
174 typedef typename MatrixType::PlainObject FullMatrixType;
175 typedef MatrixType ExpressionType;
178 FlagsLvalueBit = is_lvalue<MatrixType>::value ?
LvalueBit : 0,
184 template<
typename _MatrixType,
unsigned int _Mode,
typename StorageKind>
class TriangularViewImpl;
187 :
public TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind >
191 typedef TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind > Base;
192 typedef typename internal::traits<TriangularView>::Scalar Scalar;
193 typedef _MatrixType MatrixType;
196 typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;
197 typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
199 typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
203 typedef typename internal::traits<TriangularView>::StorageKind StorageKind;
204 typedef typename internal::traits<TriangularView>::MatrixTypeNestedCleaned NestedExpression;
208 Flags = internal::traits<TriangularView>::Flags,
213 IsVectorAtCompileTime =
false
217 explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix)
254 EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
255 typename MatrixType::TransposeReturnType tmp(m_matrix);
267 template<
typename Other>
275 template<
int S
ide,
typename Other>
277 inline const internal::triangular_solve_retval<Side,TriangularView, Other>
279 {
return Base::template solve<Side>(other); }
314 return m_matrix.diagonal().prod();
319 MatrixTypeNested m_matrix;
331 template<
typename _MatrixType,
unsigned int _Mode>
class TriangularViewImpl<_MatrixType,_Mode,
Dense>
338 typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
340 typedef _MatrixType MatrixType;
341 typedef typename MatrixType::PlainObject DenseMatrixType;
342 typedef DenseMatrixType PlainObject;
345 using Base::evalToLazy;
348 typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
352 Flags = internal::traits<TriangularViewType>::Flags
365 template<
typename Other>
368 internal::call_assignment_no_alias(derived(), other.
derived(), internal::add_assign_op<Scalar,typename Other::Scalar>());
372 template<
typename Other>
375 internal::call_assignment_no_alias(derived(), other.
derived(), internal::sub_assign_op<Scalar,typename Other::Scalar>());
388 void fill(
const Scalar& value) { setConstant(value); }
392 {
return *
this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
406 Base::check_coordinates_internal(row, col);
407 return derived().nestedExpression().coeff(row, col);
417 Base::check_coordinates_internal(row, col);
418 return derived().nestedExpression().coeffRef(row, col);
422 template<
typename OtherDerived>
427 template<
typename OtherDerived>
431 #ifndef EIGEN_PARSED_BY_DOXYGEN
434 {
return *
this = other.derived().nestedExpression(); }
437 template<
typename OtherDerived>
442 template<
typename OtherDerived>
448 template<
typename OtherDerived>
457 template<
typename OtherDerived>
friend
488 template<
int S
ide,
typename Other>
490 inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
502 template<
int S
ide,
typename OtherDerived>
506 template<
typename OtherDerived>
509 {
return solveInPlace<OnTheLeft>(other); }
512 template<
typename OtherDerived>
514 #ifdef EIGEN_PARSED_BY_DOXYGEN
520 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
521 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
526 template<
typename OtherDerived>
530 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
531 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
534 template<
typename RhsType,
typename DstType>
536 EIGEN_STRONG_INLINE
void _solve_impl(
const RhsType &rhs, DstType &dst)
const {
537 if(!internal::is_same_dense(dst,rhs))
539 this->solveInPlace(dst);
542 template<
typename ProductType>
544 EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(
const ProductType& prod,
const Scalar& alpha,
bool beta);
546 EIGEN_DEFAULT_COPY_CONSTRUCTOR(TriangularViewImpl)
547 EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TriangularViewImpl)
555 #ifndef EIGEN_PARSED_BY_DOXYGEN
557 template<
typename MatrixType,
unsigned int Mode>
558 template<
typename OtherDerived>
559 inline TriangularView<MatrixType, Mode>&
560 TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
const MatrixBase<OtherDerived>& other)
562 internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
567 template<
typename MatrixType,
unsigned int Mode>
568 template<
typename OtherDerived>
569 void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
const MatrixBase<OtherDerived>& other)
571 internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
576 template<
typename MatrixType,
unsigned int Mode>
577 template<
typename OtherDerived>
578 inline TriangularView<MatrixType, Mode>&
579 TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
const TriangularBase<OtherDerived>& other)
581 eigen_assert(Mode ==
int(OtherDerived::Mode));
582 internal::call_assignment(derived(), other.derived());
586 template<
typename MatrixType,
unsigned int Mode>
587 template<
typename OtherDerived>
588 void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
const TriangularBase<OtherDerived>& other)
590 eigen_assert(Mode ==
int(OtherDerived::Mode));
591 internal::call_assignment_no_alias(derived(), other.derived());
601 template<
typename Derived>
602 template<
typename DenseDerived>
627 template<
typename Derived>
628 template<
unsigned int Mode>
636 template<
typename Derived>
637 template<
unsigned int Mode>
649 template<
typename Derived>
652 RealScalar maxAbsOnUpperPart =
static_cast<RealScalar
>(-1);
653 for(
Index j = 0; j < cols(); ++j)
655 Index maxi = numext::mini(j, rows()-1);
656 for(
Index i = 0; i <= maxi; ++i)
658 RealScalar absValue = numext::abs(coeff(i,j));
659 if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
662 RealScalar threshold = maxAbsOnUpperPart * prec;
663 for(
Index j = 0; j < cols(); ++j)
664 for(
Index i = j+1; i < rows(); ++i)
665 if(numext::abs(coeff(i, j)) > threshold)
return false;
674 template<
typename Derived>
677 RealScalar maxAbsOnLowerPart =
static_cast<RealScalar
>(-1);
678 for(
Index j = 0; j < cols(); ++j)
679 for(
Index i = j; i < rows(); ++i)
681 RealScalar absValue = numext::abs(coeff(i,j));
682 if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
684 RealScalar threshold = maxAbsOnLowerPart * prec;
685 for(
Index j = 1; j < cols(); ++j)
687 Index maxi = numext::mini(j, rows()-1);
688 for(
Index i = 0; i < maxi; ++i)
689 if(numext::abs(coeff(i, j)) > threshold)
return false;
707 template<
typename MatrixType,
unsigned int Mode>
710 typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;
711 typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;
714 template<
typename MatrixType,
unsigned int Mode>
715 struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
716 : evaluator<typename internal::remove_all<MatrixType>::type>
718 typedef TriangularView<MatrixType,Mode> XprType;
719 typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
720 unary_evaluator(
const XprType &xpr) : Base(xpr.nestedExpression()) {}
724 struct Triangular2Triangular {};
725 struct Triangular2Dense {};
726 struct Dense2Triangular {};
729 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool ClearOpposite>
struct triangular_assignment_loop;
737 template<
int UpLo,
int Mode,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version = Specialized>
738 class triangular_dense_assignment_kernel :
public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
741 typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;
742 typedef typename Base::DstXprType DstXprType;
743 typedef typename Base::SrcXprType SrcXprType;
746 using Base::m_functor;
749 typedef typename Base::DstEvaluatorType DstEvaluatorType;
750 typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
751 typedef typename Base::Scalar Scalar;
752 typedef typename Base::AssignmentTraits AssignmentTraits;
755 EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst,
const SrcEvaluatorType &src,
const Functor &func, DstXprType& dstExpr)
756 : Base(dst, src, func, dstExpr)
759 #ifdef EIGEN_INTERNAL_DEBUGGING
760 EIGEN_DEVICE_FUNC
void assignCoeff(
Index row,
Index col)
762 eigen_internal_assert(row!=col);
763 Base::assignCoeff(row,col);
766 using Base::assignCoeff;
769 EIGEN_DEVICE_FUNC
void assignDiagonalCoeff(
Index id)
771 if(Mode==
UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(1));
772 else if(Mode==
ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(0));
773 else if(Mode==0) Base::assignCoeff(
id,
id);
776 EIGEN_DEVICE_FUNC
void assignOppositeCoeff(
Index row,
Index col)
778 eigen_internal_assert(row!=col);
780 m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
784 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType,
typename Functor>
785 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
786 void call_triangular_assignment_loop(DstXprType& dst,
const SrcXprType& src,
const Functor &func)
788 typedef evaluator<DstXprType> DstEvaluatorType;
789 typedef evaluator<SrcXprType> SrcEvaluatorType;
791 SrcEvaluatorType srcEvaluator(src);
793 Index dstRows = src.rows();
794 Index dstCols = src.cols();
795 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
796 dst.resize(dstRows, dstCols);
797 DstEvaluatorType dstEvaluator(dst);
800 DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
801 Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
804 unroll = DstXprType::SizeAtCompileTime !=
Dynamic
805 && SrcEvaluatorType::CoeffReadCost <
HugeCost
806 && DstXprType::SizeAtCompileTime * (DstEvaluatorType::CoeffReadCost+SrcEvaluatorType::CoeffReadCost) / 2 <= EIGEN_UNROLLING_LIMIT
809 triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) :
Dynamic, SetOpposite>::run(kernel);
812 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType>
813 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
814 void call_triangular_assignment_loop(DstXprType& dst,
const SrcXprType& src)
816 call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());
819 template<>
struct AssignmentKind<TriangularShape,TriangularShape> {
typedef Triangular2Triangular Kind; };
820 template<>
struct AssignmentKind<DenseShape,TriangularShape> {
typedef Triangular2Dense Kind; };
821 template<>
struct AssignmentKind<TriangularShape,DenseShape> {
typedef Dense2Triangular Kind; };
824 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
825 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
827 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
829 eigen_assert(
int(DstXprType::Mode) ==
int(SrcXprType::Mode));
831 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
835 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
836 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>
838 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
840 call_triangular_assignment_loop<SrcXprType::Mode, (SrcXprType::Mode&SelfAdjoint)==0>(dst, src, func);
844 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
845 struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>
847 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
849 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
854 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool SetOpposite>
855 struct triangular_assignment_loop
858 typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
859 typedef typename DstEvaluatorType::XprType DstXprType;
862 col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
863 row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
866 typedef typename Kernel::Scalar Scalar;
869 static inline void run(Kernel &kernel)
871 triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
874 kernel.assignDiagonalCoeff(row);
875 else if( ((Mode&
Lower) && row>col) || ((Mode&
Upper) && row<col) )
876 kernel.assignCoeff(row,col);
878 kernel.assignOppositeCoeff(row,col);
883 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
884 struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
887 static inline void run(Kernel &) {}
896 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
897 struct triangular_assignment_loop<Kernel, Mode,
Dynamic, SetOpposite>
899 typedef typename Kernel::Scalar Scalar;
901 static inline void run(Kernel &kernel)
903 for(
Index j = 0; j < kernel.cols(); ++j)
905 Index maxi = numext::mini(j, kernel.rows());
907 if (((Mode&
Lower) && SetOpposite) || (Mode&
Upper))
910 if(Mode&
Upper) kernel.assignCoeff(i, j);
911 else kernel.assignOppositeCoeff(i, j);
917 kernel.assignDiagonalCoeff(i++);
919 if (((Mode&
Upper) && SetOpposite) || (Mode&
Lower))
921 for(; i < kernel.rows(); ++i)
922 if(Mode&
Lower) kernel.assignCoeff(i, j);
923 else kernel.assignOppositeCoeff(i, j);
933 template<
typename Derived>
934 template<
typename DenseDerived>
937 other.
derived().resize(this->rows(), this->cols());
938 internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&
SelfAdjoint)==0 >(other.
derived(), derived().nestedExpression());
944 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
945 struct Assignment<DstXprType,
Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
948 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::assign_op<Scalar,typename SrcXprType::Scalar> &)
950 Index dstRows = src.rows();
951 Index dstCols = src.cols();
952 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
953 dst.resize(dstRows, dstCols);
955 dst._assignProduct(src, 1, 0);
960 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
961 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
963 typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
964 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)
966 dst._assignProduct(src, 1, 1);
971 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
972 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
974 typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
975 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)
977 dst._assignProduct(src, -1, 1);
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:47
Derived & derived()
Definition: EigenBase.h:45
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:675
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:650
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:75
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:51
Pseudo expression representing a solving operation.
Definition: Solve.h:63
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:28
void copyCoeff(Index row, Index col, Other &other)
Definition: TriangularMatrix.h:84
@ SizeAtCompileTime
Definition: TriangularMatrix.h:38
void evalTo(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:603
void evalToLazy(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:935
TriangularViewType & setConstant(const Scalar &value)
Definition: TriangularMatrix.h:391
TriangularViewType & operator=(const MatrixBase< OtherDerived > &other)
TriangularViewType & operator+=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:367
void solveInPlace(const MatrixBase< OtherDerived > &other) const
void swap(TriangularBase< OtherDerived > &other)
Definition: TriangularMatrix.h:515
TriangularViewType & setOnes()
Definition: TriangularMatrix.h:398
Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:404
TriangularViewType & operator=(const TriangularBase< OtherDerived > &other)
TriangularViewType & setZero()
Definition: TriangularMatrix.h:395
TriangularViewType & operator-=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:374
const internal::triangular_solve_retval< Side, TriangularViewType, Other > solve(const MatrixBase< Other > &other) const
void swap(MatrixBase< OtherDerived > const &other)
Definition: TriangularMatrix.h:528
void fill(const Scalar &value)
Definition: TriangularMatrix.h:388
const Product< TriangularViewType, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Definition: TriangularMatrix.h:451
Index innerStride() const
Definition: TriangularMatrix.h:362
friend const Product< OtherDerived, TriangularViewType > operator*(const MatrixBase< OtherDerived > &lhs, const TriangularViewImpl &rhs)
Definition: TriangularMatrix.h:460
TriangularViewType & operator*=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:381
TriangularViewType & operator/=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:384
Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:414
Index outerStride() const
Definition: TriangularMatrix.h:358
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:188
const NestedExpression & nestedExpression() const
Definition: TriangularMatrix.h:231
Index rows() const
Definition: TriangularMatrix.h:224
SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView()
Definition: TriangularMatrix.h:289
const ConjugateReturnType conjugate() const
Definition: TriangularMatrix.h:240
NestedExpression & nestedExpression()
Definition: TriangularMatrix.h:235
const SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView() const
Definition: TriangularMatrix.h:297
const ConstTransposeReturnType transpose() const
Definition: TriangularMatrix.h:262
const AdjointReturnType adjoint() const
Definition: TriangularMatrix.h:246
Scalar determinant() const
Definition: TriangularMatrix.h:307
TransposeReturnType transpose()
Definition: TriangularMatrix.h:252
Index cols() const
Definition: TriangularMatrix.h:227
@ StrictlyLower
Definition: Constants.h:216
@ UnitDiag
Definition: Constants.h:208
@ StrictlyUpper
Definition: Constants.h:218
@ UnitLower
Definition: Constants.h:212
@ ZeroDiag
Definition: Constants.h:210
@ SelfAdjoint
Definition: Constants.h:220
@ UnitUpper
Definition: Constants.h:214
@ Lower
Definition: Constants.h:204
@ Upper
Definition: Constants.h:206
const unsigned int PacketAccessBit
Definition: Constants.h:89
const unsigned int LinearAccessBit
Definition: Constants.h:125
const unsigned int DirectAccessBit
Definition: Constants.h:150
const unsigned int LvalueBit
Definition: Constants.h:139
Namespace containing all symbols from the Eigen library.
Definition: Core:309
const int HugeCost
Definition: Constants.h:39
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
const int Dynamic
Definition: Constants.h:21
Definition: Constants.h:491
Definition: EigenBase.h:30
Derived & derived()
Definition: EigenBase.h:45
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:38