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); }
107 #endif // not EIGEN_PARSED_BY_DOXYGEN
109 template<
typename DenseDerived>
111 void evalTo(MatrixBase<DenseDerived> &other)
const;
112 template<
typename DenseDerived>
114 void evalToLazy(MatrixBase<DenseDerived> &other)
const;
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); }
226 inline Index rows()
const {
return m_matrix.rows(); }
228 inline Index cols()
const {
return m_matrix.cols(); }
231 const NestedExpression& nestedExpression()
const {
return m_matrix; }
233 NestedExpression& nestedExpression() {
return *
const_cast<NestedExpression*
>(&m_matrix); }
238 inline const ConjugateReturnType conjugate()
const
244 inline const AdjointReturnType
adjoint()
const
245 {
return AdjointReturnType(m_matrix.adjoint()); }
252 EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
253 typename MatrixType::TransposeReturnType tmp(m_matrix.const_cast_derived());
254 return TransposeReturnType(tmp);
262 return ConstTransposeReturnType(m_matrix.transpose());
265 template<
typename Other>
273 template<
int S
ide,
typename Other>
275 inline const internal::triangular_solve_retval<Side,TriangularView, Other>
276 solve(
const MatrixBase<Other>& other)
const
277 {
return Base::template solve<Side>(other); }
283 const SelfAdjointView<MatrixTypeNestedNonRef,Mode> selfadjointView()
const
285 EIGEN_STATIC_ASSERT((Mode&
UnitDiag)==0,PROGRAMMING_ERROR);
286 return SelfAdjointView<MatrixTypeNestedNonRef,Mode>(m_matrix);
289 SelfAdjointView<MatrixTypeNestedNonRef,Mode> selfadjointView()
291 EIGEN_STATIC_ASSERT((Mode&
UnitDiag)==0,PROGRAMMING_ERROR);
292 return SelfAdjointView<MatrixTypeNestedNonRef,Mode>(m_matrix);
296 Scalar determinant()
const
303 return m_matrix.diagonal().prod();
308 MatrixTypeNested m_matrix;
320 template<
typename _MatrixType,
unsigned int _Mode>
class TriangularViewImpl<_MatrixType,_Mode,
Dense>
327 typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
329 typedef _MatrixType MatrixType;
330 typedef typename MatrixType::PlainObject DenseMatrixType;
331 typedef DenseMatrixType PlainObject;
334 using Base::evalToLazy;
337 typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
341 Flags = internal::traits<TriangularViewType>::Flags
345 inline Index outerStride()
const {
return derived().nestedExpression().outerStride(); }
347 inline Index innerStride()
const {
return derived().nestedExpression().innerStride(); }
350 template<
typename Other>
353 internal::call_assignment_no_alias(derived(), other.derived(), internal::add_assign_op<Scalar>());
357 template<
typename Other>
360 internal::call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar>());
366 TriangularViewType&
operator*=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().nestedExpression() * other; }
369 TriangularViewType&
operator/=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().nestedExpression() / other; }
373 void fill(
const Scalar& value) { setConstant(value); }
377 {
return *
this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
380 TriangularViewType&
setZero() {
return setConstant(Scalar(0)); }
383 TriangularViewType&
setOnes() {
return setConstant(Scalar(1)); }
391 Base::check_coordinates_internal(row, col);
392 return derived().nestedExpression().coeff(row, col);
401 EIGEN_STATIC_ASSERT_LVALUE(TriangularViewType);
402 Base::check_coordinates_internal(row, col);
403 return derived().nestedExpression().const_cast_derived().coeffRef(row, col);
407 template<
typename OtherDerived>
411 template<
typename OtherDerived>
416 TriangularViewType& operator=(
const TriangularViewImpl& other)
417 {
return *
this = other.derived().nestedExpression(); }
419 template<
typename OtherDerived>
421 void lazyAssign(
const TriangularBase<OtherDerived>& other);
423 template<
typename OtherDerived>
425 void lazyAssign(
const MatrixBase<OtherDerived>& other);
428 template<
typename OtherDerived>
430 const Product<TriangularViewType,OtherDerived>
437 template<
typename OtherDerived>
friend
445 template<
int S
ide,
typename Other>
447 inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
450 template<
int S
ide,
typename OtherDerived>
454 template<
typename OtherDerived>
457 {
return solveInPlace<OnTheLeft>(other); }
459 template<
typename OtherDerived>
461 void swap(TriangularBase<OtherDerived>
const & other)
463 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
467 template<
typename OtherDerived>
469 void swap(MatrixBase<OtherDerived>
const & other)
471 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
474 template<
typename RhsType,
typename DstType>
476 EIGEN_STRONG_INLINE
void _solve_impl(
const RhsType &rhs, DstType &dst)
const {
477 if(!(internal::is_same<RhsType,DstType>::value && internal::extract_data(dst) == internal::extract_data(rhs)))
479 this->solveInPlace(dst);
482 template<
typename ProductType>
484 EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(
const ProductType& prod,
const Scalar& alpha);
492 template<
typename MatrixType,
unsigned int Mode>
493 template<
typename OtherDerived>
494 inline TriangularView<MatrixType, Mode>&
495 TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
const MatrixBase<OtherDerived>& other)
497 internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar>());
502 template<
typename MatrixType,
unsigned int Mode>
503 template<
typename OtherDerived>
504 void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
const MatrixBase<OtherDerived>& other)
506 internal::call_assignment(derived().noalias(), other.template triangularView<Mode>());
511 template<
typename MatrixType,
unsigned int Mode>
512 template<
typename OtherDerived>
513 inline TriangularView<MatrixType, Mode>&
514 TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
const TriangularBase<OtherDerived>& other)
516 eigen_assert(Mode ==
int(OtherDerived::Mode));
517 internal::call_assignment(derived(), other.derived());
521 template<
typename MatrixType,
unsigned int Mode>
522 template<
typename OtherDerived>
523 void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
const TriangularBase<OtherDerived>& other)
525 eigen_assert(Mode ==
int(OtherDerived::Mode));
526 internal::call_assignment(derived().noalias(), other.derived());
535 template<
typename Derived>
536 template<
typename DenseDerived>
541 typename internal::plain_matrix_type<Derived>::type other_evaluated(rows(), cols());
542 evalToLazy(other_evaluated);
543 other.derived().
swap(other_evaluated);
546 evalToLazy(other.derived());
568 template<
typename Derived>
569 template<
unsigned int Mode>
577 template<
typename Derived>
578 template<
unsigned int Mode>
590 template<
typename Derived>
594 RealScalar maxAbsOnUpperPart =
static_cast<RealScalar
>(-1);
595 for(Index j = 0; j < cols(); ++j)
597 Index maxi = (std::min)(j, rows()-1);
598 for(Index i = 0; i <= maxi; ++i)
600 RealScalar absValue = abs(coeff(i,j));
601 if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
604 RealScalar threshold = maxAbsOnUpperPart * prec;
605 for(Index j = 0; j < cols(); ++j)
606 for(Index i = j+1; i < rows(); ++i)
607 if(abs(coeff(i, j)) > threshold)
return false;
616 template<
typename Derived>
620 RealScalar maxAbsOnLowerPart =
static_cast<RealScalar
>(-1);
621 for(Index j = 0; j < cols(); ++j)
622 for(Index i = j; i < rows(); ++i)
624 RealScalar absValue = abs(coeff(i,j));
625 if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
627 RealScalar threshold = maxAbsOnLowerPart * prec;
628 for(Index j = 1; j < cols(); ++j)
630 Index maxi = (std::min)(j, rows()-1);
631 for(Index i = 0; i < maxi; ++i)
632 if(abs(coeff(i, j)) > threshold)
return false;
650 template<
typename MatrixType,
unsigned int Mode>
651 struct evaluator_traits<TriangularView<MatrixType,Mode> >
653 typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;
654 typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;
658 static const int AssumeAliasing = 0;
661 template<
typename MatrixType,
unsigned int Mode>
662 struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
663 : evaluator<typename internal::remove_all<MatrixType>::type>
665 typedef TriangularView<MatrixType,Mode> XprType;
666 typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
667 unary_evaluator(
const XprType &xpr) : Base(xpr.nestedExpression()) {}
671 struct Triangular2Triangular {};
672 struct Triangular2Dense {};
673 struct Dense2Triangular {};
676 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool ClearOpposite>
struct triangular_assignment_loop;
684 template<
int UpLo,
int Mode,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version = Specialized>
685 class triangular_dense_assignment_kernel :
public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
688 typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;
689 typedef typename Base::DstXprType DstXprType;
690 typedef typename Base::SrcXprType SrcXprType;
693 using Base::m_functor;
696 typedef typename Base::DstEvaluatorType DstEvaluatorType;
697 typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
698 typedef typename Base::Scalar Scalar;
699 typedef typename Base::AssignmentTraits AssignmentTraits;
702 EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst,
const SrcEvaluatorType &src,
const Functor &func, DstXprType& dstExpr)
703 : Base(dst, src, func, dstExpr)
706 #ifdef EIGEN_INTERNAL_DEBUGGING
707 EIGEN_DEVICE_FUNC
void assignCoeff(Index row, Index col)
709 eigen_internal_assert(row!=col);
710 Base::assignCoeff(row,col);
713 using Base::assignCoeff;
716 EIGEN_DEVICE_FUNC
void assignDiagonalCoeff(Index
id)
718 if(Mode==UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(1));
719 else if(Mode==ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(0));
720 else if(Mode==0) Base::assignCoeff(
id,
id);
723 EIGEN_DEVICE_FUNC
void assignOppositeCoeff(Index row, Index col)
725 eigen_internal_assert(row!=col);
727 m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
731 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType,
typename Functor>
732 EIGEN_DEVICE_FUNC
void call_triangular_assignment_loop(
const DstXprType& dst,
const SrcXprType& src,
const Functor &func)
734 eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols());
736 typedef evaluator<DstXprType> DstEvaluatorType;
737 typedef evaluator<SrcXprType> SrcEvaluatorType;
739 DstEvaluatorType dstEvaluator(dst);
740 SrcEvaluatorType srcEvaluator(src);
742 typedef triangular_dense_assignment_kernel< Mode&(
Lower|
Upper),Mode&(UnitDiag|ZeroDiag|
SelfAdjoint),SetOpposite,
743 DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
744 Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
747 unroll = DstXprType::SizeAtCompileTime != Dynamic
748 && SrcEvaluatorType::CoeffReadCost != Dynamic
749 && DstXprType::SizeAtCompileTime * SrcEvaluatorType::CoeffReadCost / 2 <= EIGEN_UNROLLING_LIMIT
752 triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);
755 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType>
756 EIGEN_DEVICE_FUNC
void call_triangular_assignment_loop(
const DstXprType& dst,
const SrcXprType& src)
758 call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar>());
761 template<>
struct AssignmentKind<TriangularShape,TriangularShape> {
typedef Triangular2Triangular Kind; };
762 template<>
struct AssignmentKind<DenseShape,TriangularShape> {
typedef Triangular2Dense Kind; };
763 template<>
struct AssignmentKind<TriangularShape,DenseShape> {
typedef Dense2Triangular Kind; };
766 template<
typename DstXprType,
typename SrcXprType,
typename Functor,
typename Scalar>
767 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular, Scalar>
769 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
771 eigen_assert(
int(DstXprType::Mode) ==
int(SrcXprType::Mode));
773 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
777 template<
typename DstXprType,
typename SrcXprType,
typename Functor,
typename Scalar>
778 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense, Scalar>
780 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
782 call_triangular_assignment_loop<SrcXprType::Mode, (SrcXprType::Mode&SelfAdjoint)==0>(dst, src, func);
786 template<
typename DstXprType,
typename SrcXprType,
typename Functor,
typename Scalar>
787 struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular, Scalar>
789 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
791 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
796 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool SetOpposite>
797 struct triangular_assignment_loop
800 typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
801 typedef typename DstEvaluatorType::XprType DstXprType;
804 col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
805 row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
808 typedef typename Kernel::Scalar Scalar;
811 static inline void run(Kernel &kernel)
813 triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
816 kernel.assignDiagonalCoeff(row);
817 else if( ((Mode&
Lower) && row>col) || ((Mode&
Upper) && row<col) )
818 kernel.assignCoeff(row,col);
820 kernel.assignOppositeCoeff(row,col);
825 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
826 struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
829 static inline void run(Kernel &) {}
838 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
839 struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
841 typedef typename Kernel::Scalar Scalar;
843 static inline void run(Kernel &kernel)
845 for(Index j = 0; j < kernel.cols(); ++j)
847 Index maxi = (std::min)(j, kernel.rows());
849 if (((Mode&Lower) && SetOpposite) || (Mode&
Upper))
852 if(Mode&Upper) kernel.assignCoeff(i, j);
853 else kernel.assignOppositeCoeff(i, j);
859 kernel.assignDiagonalCoeff(i++);
861 if (((Mode&Upper) && SetOpposite) || (Mode&Lower))
863 for(; i < kernel.rows(); ++i)
864 if(Mode&Lower) kernel.assignCoeff(i, j);
865 else kernel.assignOppositeCoeff(i, j);
875 template<
typename Derived>
876 template<
typename DenseDerived>
879 other.derived().
resize(this->rows(), this->cols());
880 internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&
SelfAdjoint)==0 >(other.derived(), derived().nestedExpression());
886 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
887 struct Assignment<DstXprType,
Product<Lhs,Rhs,DefaultProduct>,
internal::assign_op<Scalar>, Dense2Triangular, Scalar>
890 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::assign_op<Scalar> &)
893 dst._assignProduct(src, 1);
898 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
899 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>,
internal::add_assign_op<Scalar>, Dense2Triangular, Scalar>
901 typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
902 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::add_assign_op<Scalar> &)
904 dst._assignProduct(src, 1);
909 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
910 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>,
internal::sub_assign_op<Scalar>, Dense2Triangular, Scalar>
912 typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
913 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::sub_assign_op<Scalar> &)
915 dst._assignProduct(src, -1);
923 #endif // EIGEN_TRIANGULARMATRIX_H
Definition: Constants.h:204
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:107
TriangularViewType & setConstant(const Scalar &value)
Definition: TriangularMatrix.h:376
TransposeReturnType transpose()
Definition: TriangularMatrix.h:250
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:27
const unsigned int DirectAccessBit
Definition: Constants.h:141
Definition: Constants.h:196
Definition: Constants.h:202
const unsigned int LvalueBit
Definition: Constants.h:130
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:617
friend const Product< OtherDerived, TriangularViewType > operator*(const MatrixBase< OtherDerived > &lhs, const TriangularViewImpl &rhs)
Definition: TriangularMatrix.h:440
TriangularViewType & setOnes()
Definition: TriangularMatrix.h:383
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:366
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
const unsigned int PacketAccessBit
Definition: Constants.h:80
void resize(Index newSize)
Definition: DenseBase.h:252
Definition: EigenBase.h:28
const ConstTransposeReturnType transpose() const
Definition: TriangularMatrix.h:260
Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:389
const Product< TriangularViewType, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Definition: TriangularMatrix.h:431
Definition: Constants.h:198
void copyCoeff(Index row, Index col, Other &other)
Definition: TriangularMatrix.h:84
TriangularView< const MatrixConjugateReturnType, Mode > ConjugateReturnType
Definition: TriangularMatrix.h:236
TriangularViewType & operator/=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:369
const AdjointReturnType adjoint() const
Definition: TriangularMatrix.h:244
Definition: Constants.h:210
const unsigned int EvalBeforeAssigningBit
Definition: Constants.h:62
void evalTo(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:537
void swap(const DenseBase< OtherDerived > &other)
Definition: DenseBase.h:425
Definition: Constants.h:200
TriangularViewType & setZero()
Definition: TriangularMatrix.h:380
Definition: Eigen_Colamd.h:54
Definition: Constants.h:208
Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:399
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:591
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:186
Definition: Constants.h:206
TriangularViewType & operator-=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:359
Definition: Constants.h:482
Pseudo expression representing a solving operation.
Definition: Solve.h:63
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
Definition: TriangularMatrix.h:38
const unsigned int LinearAccessBit
Definition: Constants.h:116
void fill(const Scalar &value)
Definition: TriangularMatrix.h:373
Definition: Constants.h:212
TriangularViewType & operator+=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:352
void evalToLazy(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:877