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;
59 inline Index rows()
const {
return derived().rows(); }
61 inline Index cols()
const {
return derived().cols(); }
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); }
107 #endif // not EIGEN_PARSED_BY_DOXYGEN 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>::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 218 explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix)
221 using Base::operator=;
222 TriangularView& operator=(
const TriangularView &other)
223 {
return Base::operator=(other); }
227 inline Index
rows()
const {
return m_matrix.rows(); }
230 inline Index
cols()
const {
return m_matrix.cols(); }
244 {
return ConjugateReturnType(m_matrix.conjugate()); }
249 inline const AdjointReturnType
adjoint()
const 250 {
return AdjointReturnType(m_matrix.adjoint()); }
257 EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
258 typename MatrixType::TransposeReturnType tmp(m_matrix.const_cast_derived());
259 return TransposeReturnType(tmp);
267 return ConstTransposeReturnType(m_matrix.transpose());
270 template<
typename Other>
278 template<
int S
ide,
typename Other>
280 inline const internal::triangular_solve_retval<Side,TriangularView, Other>
282 {
return Base::template solve<Side>(other); }
317 return m_matrix.diagonal().prod();
322 MatrixTypeNested m_matrix;
334 template<
typename _MatrixType,
unsigned int _Mode>
class TriangularViewImpl<_MatrixType,_Mode,
Dense>
341 typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
343 typedef _MatrixType MatrixType;
344 typedef typename MatrixType::PlainObject DenseMatrixType;
345 typedef DenseMatrixType PlainObject;
348 using Base::evalToLazy;
351 typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
355 Flags = internal::traits<TriangularViewType>::Flags
368 template<
typename Other>
371 internal::call_assignment_no_alias(derived(), other.derived(), internal::add_assign_op<Scalar>());
375 template<
typename Other>
378 internal::call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar>());
384 TriangularViewType&
operator*=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().
nestedExpression() * other; }
387 TriangularViewType&
operator/=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().
nestedExpression() / other; }
391 void fill(
const Scalar& value) { setConstant(value); }
395 {
return *
this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
398 TriangularViewType&
setZero() {
return setConstant(Scalar(0)); }
401 TriangularViewType&
setOnes() {
return setConstant(Scalar(1)); }
409 Base::check_coordinates_internal(row, col);
410 return derived().nestedExpression().coeff(row, col);
419 EIGEN_STATIC_ASSERT_LVALUE(TriangularViewType);
420 Base::check_coordinates_internal(row, col);
421 return derived().nestedExpression().const_cast_derived().coeffRef(row, col);
425 template<
typename OtherDerived>
430 template<
typename OtherDerived>
434 #ifndef EIGEN_PARSED_BY_DOXYGEN 436 TriangularViewType& operator=(
const TriangularViewImpl& other)
437 {
return *
this = other.derived().nestedExpression(); }
440 template<
typename OtherDerived>
445 template<
typename OtherDerived>
451 template<
typename OtherDerived>
460 template<
typename OtherDerived>
friend 489 template<
int S
ide,
typename Other>
491 inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
501 template<
int S
ide,
typename OtherDerived>
505 template<
typename OtherDerived>
508 {
return solveInPlace<OnTheLeft>(other); }
511 template<
typename OtherDerived>
513 #ifdef EIGEN_PARSED_BY_DOXYGEN 519 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
520 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
525 template<
typename OtherDerived>
529 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
530 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
533 template<
typename RhsType,
typename DstType>
535 EIGEN_STRONG_INLINE
void _solve_impl(
const RhsType &rhs, DstType &dst)
const {
536 if(!(internal::is_same<RhsType,DstType>::value && internal::extract_data(dst) == internal::extract_data(rhs)))
538 this->solveInPlace(dst);
541 template<
typename ProductType>
543 EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(
const ProductType& prod,
const Scalar& alpha);
551 template<
typename MatrixType,
unsigned int Mode>
552 template<
typename OtherDerived>
556 internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar>());
561 template<
typename MatrixType,
unsigned int Mode>
562 template<
typename OtherDerived>
565 internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
570 template<
typename MatrixType,
unsigned int Mode>
571 template<
typename OtherDerived>
575 eigen_assert(Mode ==
int(OtherDerived::Mode));
576 internal::call_assignment(derived(), other.
derived());
580 template<
typename MatrixType,
unsigned int Mode>
581 template<
typename OtherDerived>
584 eigen_assert(Mode ==
int(OtherDerived::Mode));
585 internal::call_assignment_no_alias(derived(), other.
derived());
594 template<
typename Derived>
595 template<
typename DenseDerived>
600 typename internal::plain_matrix_type<Derived>::type other_evaluated(rows(), cols());
601 evalToLazy(other_evaluated);
602 other.derived().
swap(other_evaluated);
605 evalToLazy(other.derived());
627 template<
typename Derived>
628 template<
unsigned int Mode>
636 template<
typename Derived>
637 template<
unsigned int Mode>
649 template<
typename Derived>
653 RealScalar maxAbsOnUpperPart =
static_cast<RealScalar
>(-1);
654 for(Index j = 0; j < cols(); ++j)
656 Index maxi = (std::min)(j, rows()-1);
657 for(Index i = 0; i <= maxi; ++i)
659 RealScalar absValue = abs(coeff(i,j));
660 if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
663 RealScalar threshold = maxAbsOnUpperPart * prec;
664 for(Index j = 0; j < cols(); ++j)
665 for(Index i = j+1; i < rows(); ++i)
666 if(abs(coeff(i, j)) > threshold)
return false;
675 template<
typename Derived>
679 RealScalar maxAbsOnLowerPart =
static_cast<RealScalar
>(-1);
680 for(Index j = 0; j < cols(); ++j)
681 for(Index i = j; i < rows(); ++i)
683 RealScalar absValue = abs(coeff(i,j));
684 if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
686 RealScalar threshold = maxAbsOnLowerPart * prec;
687 for(Index j = 1; j < cols(); ++j)
689 Index maxi = (std::min)(j, rows()-1);
690 for(Index i = 0; i < maxi; ++i)
691 if(abs(coeff(i, j)) > threshold)
return false;
709 template<
typename MatrixType,
unsigned int Mode>
710 struct evaluator_traits<TriangularView<MatrixType,Mode> >
712 typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;
713 typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;
716 template<
typename MatrixType,
unsigned int Mode>
717 struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
718 : evaluator<typename internal::remove_all<MatrixType>::type>
721 typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
722 unary_evaluator(
const XprType &xpr) : Base(xpr.nestedExpression()) {}
726 struct Triangular2Triangular {};
727 struct Triangular2Dense {};
728 struct Dense2Triangular {};
731 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool ClearOpposite>
struct triangular_assignment_loop;
739 template<
int UpLo,
int Mode,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version = Specialized>
740 class triangular_dense_assignment_kernel :
public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
743 typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;
744 typedef typename Base::DstXprType DstXprType;
745 typedef typename Base::SrcXprType SrcXprType;
748 using Base::m_functor;
751 typedef typename Base::DstEvaluatorType DstEvaluatorType;
752 typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
753 typedef typename Base::Scalar Scalar;
754 typedef typename Base::AssignmentTraits AssignmentTraits;
757 EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst,
const SrcEvaluatorType &src,
const Functor &func, DstXprType& dstExpr)
758 : Base(dst, src, func, dstExpr)
761 #ifdef EIGEN_INTERNAL_DEBUGGING 762 EIGEN_DEVICE_FUNC
void assignCoeff(Index row, Index col)
764 eigen_internal_assert(row!=col);
765 Base::assignCoeff(row,col);
768 using Base::assignCoeff;
771 EIGEN_DEVICE_FUNC
void assignDiagonalCoeff(Index
id)
773 if(Mode==
UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(1));
774 else if(Mode==
ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(0));
775 else if(Mode==0) Base::assignCoeff(
id,
id);
778 EIGEN_DEVICE_FUNC
void assignOppositeCoeff(Index row, Index col)
780 eigen_internal_assert(row!=col);
782 m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
786 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType,
typename Functor>
787 EIGEN_DEVICE_FUNC
void call_triangular_assignment_loop(
const DstXprType& dst,
const SrcXprType& src,
const Functor &func)
789 eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());
791 typedef evaluator<DstXprType> DstEvaluatorType;
792 typedef evaluator<SrcXprType> SrcEvaluatorType;
794 DstEvaluatorType dstEvaluator(dst);
795 SrcEvaluatorType srcEvaluator(src);
798 DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
799 Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
802 unroll = DstXprType::SizeAtCompileTime != Dynamic
803 && SrcEvaluatorType::CoeffReadCost < HugeCost
804 && DstXprType::SizeAtCompileTime * SrcEvaluatorType::CoeffReadCost / 2 <= EIGEN_UNROLLING_LIMIT
807 triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);
810 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType>
811 EIGEN_DEVICE_FUNC
void call_triangular_assignment_loop(
const DstXprType& dst,
const SrcXprType& src)
813 call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar>());
816 template<>
struct AssignmentKind<TriangularShape,TriangularShape> {
typedef Triangular2Triangular Kind; };
817 template<>
struct AssignmentKind<DenseShape,TriangularShape> {
typedef Triangular2Dense Kind; };
818 template<>
struct AssignmentKind<TriangularShape,DenseShape> {
typedef Dense2Triangular Kind; };
821 template<
typename DstXprType,
typename SrcXprType,
typename Functor,
typename Scalar>
822 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular, Scalar>
824 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
826 eigen_assert(
int(DstXprType::Mode) ==
int(SrcXprType::Mode));
828 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
832 template<
typename DstXprType,
typename SrcXprType,
typename Functor,
typename Scalar>
833 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense, Scalar>
835 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
837 call_triangular_assignment_loop<SrcXprType::Mode, (SrcXprType::Mode&SelfAdjoint)==0>(dst, src, func);
841 template<
typename DstXprType,
typename SrcXprType,
typename Functor,
typename Scalar>
842 struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular, Scalar>
844 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
846 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
851 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool SetOpposite>
852 struct triangular_assignment_loop
855 typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
856 typedef typename DstEvaluatorType::XprType DstXprType;
859 col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
860 row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
863 typedef typename Kernel::Scalar Scalar;
866 static inline void run(Kernel &kernel)
868 triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
871 kernel.assignDiagonalCoeff(row);
872 else if( ((Mode&
Lower) && row>col) || ((Mode&
Upper) && row<col) )
873 kernel.assignCoeff(row,col);
875 kernel.assignOppositeCoeff(row,col);
880 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
881 struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
884 static inline void run(Kernel &) {}
893 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
894 struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
896 typedef typename Kernel::Scalar Scalar;
898 static inline void run(Kernel &kernel)
900 for(Index j = 0; j < kernel.cols(); ++j)
902 Index maxi = (std::min)(j, kernel.rows());
904 if (((Mode&
Lower) && SetOpposite) || (Mode&
Upper))
907 if(Mode&
Upper) kernel.assignCoeff(i, j);
908 else kernel.assignOppositeCoeff(i, j);
914 kernel.assignDiagonalCoeff(i++);
916 if (((Mode&
Upper) && SetOpposite) || (Mode&Lower))
918 for(; i < kernel.rows(); ++i)
919 if(Mode&Lower) kernel.assignCoeff(i, j);
920 else kernel.assignOppositeCoeff(i, j);
930 template<
typename Derived>
931 template<
typename DenseDerived>
934 other.derived().
resize(this->rows(), this->cols());
935 internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&
SelfAdjoint)==0 >(other.derived(), derived().nestedExpression());
941 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
942 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar>, Dense2Triangular, Scalar>
945 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::assign_op<Scalar> &)
948 dst._assignProduct(src, 1);
953 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
954 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar>, Dense2Triangular, Scalar>
957 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::add_assign_op<Scalar> &)
959 dst._assignProduct(src, 1);
964 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
965 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar>, Dense2Triangular, Scalar>
968 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::sub_assign_op<Scalar> &)
970 dst._assignProduct(src, -1);
978 #endif // EIGEN_TRIANGULARMATRIX_H const NestedExpression & nestedExpression() const
Definition: TriangularMatrix.h:234
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:107
Index outerStride() const
Definition: TriangularMatrix.h:361
NestedExpression & nestedExpression()
Definition: TriangularMatrix.h:238
TriangularViewType & setConstant(const Scalar &value)
Definition: TriangularMatrix.h:394
TransposeReturnType transpose()
Definition: TriangularMatrix.h:255
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:27
const unsigned int DirectAccessBit
Definition: Constants.h:149
Index innerStride() const
Definition: TriangularMatrix.h:365
const unsigned int LvalueBit
Definition: Constants.h:138
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:676
Definition: Constants.h:210
friend const Product< OtherDerived, TriangularViewType > operator*(const MatrixBase< OtherDerived > &lhs, const TriangularViewImpl &rhs)
Definition: TriangularMatrix.h:463
TriangularViewType & setOnes()
Definition: TriangularMatrix.h:401
Derived & derived()
Definition: EigenBase.h:44
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:37
TriangularViewType & operator*=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:384
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
Scalar determinant() const
Definition: TriangularMatrix.h:310
const unsigned int PacketAccessBit
Definition: Constants.h:88
void resize(Index newSize)
Definition: DenseBase.h:245
Definition: EigenBase.h:28
const ConstTransposeReturnType transpose() const
Definition: TriangularMatrix.h:265
Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:407
const Product< TriangularViewType, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Definition: TriangularMatrix.h:454
Definition: Constants.h:214
Definition: Constants.h:204
void copyCoeff(Index row, Index col, Other &other)
Definition: TriangularMatrix.h:84
void swap(MatrixBase< OtherDerived > const &other)
Definition: TriangularMatrix.h:527
Definition: Constants.h:212
Definition: Constants.h:218
const ConjugateReturnType conjugate() const
Definition: TriangularMatrix.h:243
Index rows() const
Definition: TriangularMatrix.h:227
void swap(TriangularBase< OtherDerived > &other)
Definition: TriangularMatrix.h:514
TriangularViewType & operator/=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:387
const AdjointReturnType adjoint() const
Definition: TriangularMatrix.h:249
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:49
const unsigned int EvalBeforeAssigningBit
Definition: Constants.h:70
void evalTo(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:596
void swap(const DenseBase< OtherDerived > &other)
Definition: DenseBase.h:418
Index cols() const
Definition: TriangularMatrix.h:230
TriangularViewType & setZero()
Definition: TriangularMatrix.h:398
Definition: Eigen_Colamd.h:54
Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:417
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:650
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:186
const SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView() const
Definition: TriangularMatrix.h:300
SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView()
Definition: TriangularMatrix.h:292
Definition: Constants.h:208
TriangularViewType & operator-=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:377
Definition: Constants.h:490
Definition: Constants.h:216
Pseudo expression representing a solving operation.
Definition: Solve.h:62
Definition: Constants.h:220
Definition: Constants.h:206
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
const unsigned int LinearAccessBit
Definition: Constants.h:124
void fill(const Scalar &value)
Definition: TriangularMatrix.h:391
TriangularViewType & operator+=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:370
void evalToLazy(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:932