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>::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)
220 using Base::operator=;
221 TriangularView& operator=(
const TriangularView &other)
222 {
return Base::operator=(other); }
243 {
return ConjugateReturnType(m_matrix.conjugate()); }
248 inline const AdjointReturnType
adjoint()
const 249 {
return AdjointReturnType(m_matrix.adjoint()); }
256 EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
257 typename MatrixType::TransposeReturnType tmp(m_matrix);
258 return TransposeReturnType(tmp);
266 return ConstTransposeReturnType(m_matrix.transpose());
269 template<
typename Other>
277 template<
int S
ide,
typename Other>
279 inline const internal::triangular_solve_retval<Side,TriangularView, Other>
281 {
return Base::template solve<Side>(other); }
316 return m_matrix.diagonal().prod();
321 MatrixTypeNested m_matrix;
333 template<
typename _MatrixType,
unsigned int _Mode>
class TriangularViewImpl<_MatrixType,_Mode,
Dense>
340 typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
342 typedef _MatrixType MatrixType;
343 typedef typename MatrixType::PlainObject DenseMatrixType;
344 typedef DenseMatrixType PlainObject;
347 using Base::evalToLazy;
350 typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
354 Flags = internal::traits<TriangularViewType>::Flags
367 template<
typename Other>
370 internal::call_assignment_no_alias(derived(), other.
derived(), internal::add_assign_op<Scalar,typename Other::Scalar>());
374 template<
typename Other>
377 internal::call_assignment_no_alias(derived(), other.
derived(), internal::sub_assign_op<Scalar,typename Other::Scalar>());
383 TriangularViewType&
operator*=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().
nestedExpression() * other; }
386 TriangularViewType&
operator/=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().
nestedExpression() / other; }
390 void fill(
const Scalar& value) { setConstant(value); }
394 {
return *
this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
397 TriangularViewType&
setZero() {
return setConstant(Scalar(0)); }
400 TriangularViewType&
setOnes() {
return setConstant(Scalar(1)); }
408 Base::check_coordinates_internal(row, col);
409 return derived().nestedExpression().coeff(row, col);
418 EIGEN_STATIC_ASSERT_LVALUE(TriangularViewType);
419 Base::check_coordinates_internal(row, col);
420 return derived().nestedExpression().coeffRef(row, col);
424 template<
typename OtherDerived>
429 template<
typename OtherDerived>
433 #ifndef EIGEN_PARSED_BY_DOXYGEN 435 TriangularViewType& operator=(
const TriangularViewImpl& other)
436 {
return *
this = other.derived().nestedExpression(); }
439 template<
typename OtherDerived>
444 template<
typename OtherDerived>
450 template<
typename OtherDerived>
459 template<
typename OtherDerived>
friend 490 template<
int S
ide,
typename Other>
492 inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
504 template<
int S
ide,
typename OtherDerived>
508 template<
typename OtherDerived>
511 {
return solveInPlace<OnTheLeft>(other); }
514 template<
typename OtherDerived>
516 #ifdef EIGEN_PARSED_BY_DOXYGEN 522 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
523 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
528 template<
typename OtherDerived>
532 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
533 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
536 template<
typename RhsType,
typename DstType>
538 EIGEN_STRONG_INLINE
void _solve_impl(
const RhsType &rhs, DstType &dst)
const {
539 if(!internal::is_same_dense(dst,rhs))
541 this->solveInPlace(dst);
544 template<
typename ProductType>
546 EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(
const ProductType& prod,
const Scalar& alpha,
bool beta);
553 #ifndef EIGEN_PARSED_BY_DOXYGEN 555 template<
typename MatrixType,
unsigned int Mode>
556 template<
typename OtherDerived>
560 internal::call_assignment_no_alias(derived(), other.
derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
565 template<
typename MatrixType,
unsigned int Mode>
566 template<
typename OtherDerived>
569 internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
574 template<
typename MatrixType,
unsigned int Mode>
575 template<
typename OtherDerived>
579 eigen_assert(Mode ==
int(OtherDerived::Mode));
580 internal::call_assignment(derived(), other.
derived());
584 template<
typename MatrixType,
unsigned int Mode>
585 template<
typename OtherDerived>
588 eigen_assert(Mode ==
int(OtherDerived::Mode));
589 internal::call_assignment_no_alias(derived(), other.
derived());
599 template<
typename Derived>
600 template<
typename DenseDerived>
625 template<
typename Derived>
626 template<
unsigned int Mode>
630 return typename TriangularViewReturnType<Mode>::Type(derived());
634 template<
typename Derived>
635 template<
unsigned int Mode>
639 return typename ConstTriangularViewReturnType<Mode>::Type(derived());
647 template<
typename Derived>
650 RealScalar maxAbsOnUpperPart =
static_cast<RealScalar
>(-1);
651 for(
Index j = 0; j < cols(); ++j)
653 Index maxi = numext::mini(j, rows()-1);
654 for(
Index i = 0; i <= maxi; ++i)
656 RealScalar absValue = numext::abs(coeff(i,j));
657 if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
660 RealScalar threshold = maxAbsOnUpperPart * prec;
661 for(
Index j = 0; j < cols(); ++j)
662 for(
Index i = j+1; i < rows(); ++i)
663 if(numext::abs(coeff(i, j)) > threshold)
return false;
672 template<
typename Derived>
675 RealScalar maxAbsOnLowerPart =
static_cast<RealScalar
>(-1);
676 for(
Index j = 0; j < cols(); ++j)
677 for(
Index i = j; i < rows(); ++i)
679 RealScalar absValue = numext::abs(coeff(i,j));
680 if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
682 RealScalar threshold = maxAbsOnLowerPart * prec;
683 for(
Index j = 1; j < cols(); ++j)
685 Index maxi = numext::mini(j, rows()-1);
686 for(
Index i = 0; i < maxi; ++i)
687 if(numext::abs(coeff(i, j)) > threshold)
return false;
705 template<
typename MatrixType,
unsigned int Mode>
706 struct evaluator_traits<TriangularView<MatrixType,Mode> >
708 typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;
709 typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;
712 template<
typename MatrixType,
unsigned int Mode>
713 struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
714 : evaluator<typename internal::remove_all<MatrixType>::type>
717 typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
718 unary_evaluator(
const XprType &xpr) : Base(xpr.nestedExpression()) {}
722 struct Triangular2Triangular {};
723 struct Triangular2Dense {};
724 struct Dense2Triangular {};
727 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool ClearOpposite>
struct triangular_assignment_loop;
735 template<
int UpLo,
int Mode,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version = Specialized>
736 class triangular_dense_assignment_kernel :
public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
739 typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;
740 typedef typename Base::DstXprType DstXprType;
741 typedef typename Base::SrcXprType SrcXprType;
744 using Base::m_functor;
747 typedef typename Base::DstEvaluatorType DstEvaluatorType;
748 typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
749 typedef typename Base::Scalar Scalar;
750 typedef typename Base::AssignmentTraits AssignmentTraits;
753 EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst,
const SrcEvaluatorType &src,
const Functor &func, DstXprType& dstExpr)
754 : Base(dst, src, func, dstExpr)
757 #ifdef EIGEN_INTERNAL_DEBUGGING 758 EIGEN_DEVICE_FUNC
void assignCoeff(
Index row,
Index col)
760 eigen_internal_assert(row!=col);
761 Base::assignCoeff(row,col);
764 using Base::assignCoeff;
767 EIGEN_DEVICE_FUNC
void assignDiagonalCoeff(
Index id)
769 if(Mode==
UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(1));
770 else if(Mode==
ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(0));
771 else if(Mode==0) Base::assignCoeff(
id,
id);
774 EIGEN_DEVICE_FUNC
void assignOppositeCoeff(
Index row,
Index col)
776 eigen_internal_assert(row!=col);
778 m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
782 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType,
typename Functor>
783 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
784 void call_triangular_assignment_loop(DstXprType& dst,
const SrcXprType& src,
const Functor &func)
786 typedef evaluator<DstXprType> DstEvaluatorType;
787 typedef evaluator<SrcXprType> SrcEvaluatorType;
789 SrcEvaluatorType srcEvaluator(src);
791 Index dstRows = src.rows();
792 Index dstCols = src.cols();
793 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
794 dst.resize(dstRows, dstCols);
795 DstEvaluatorType dstEvaluator(dst);
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 * (DstEvaluatorType::CoeffReadCost+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 EIGEN_STRONG_INLINE
812 void call_triangular_assignment_loop(DstXprType& dst,
const SrcXprType& src)
814 call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());
817 template<>
struct AssignmentKind<TriangularShape,TriangularShape> {
typedef Triangular2Triangular Kind; };
818 template<>
struct AssignmentKind<DenseShape,TriangularShape> {
typedef Triangular2Dense Kind; };
819 template<>
struct AssignmentKind<TriangularShape,DenseShape> {
typedef Dense2Triangular Kind; };
822 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
823 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
825 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
827 eigen_assert(
int(DstXprType::Mode) ==
int(SrcXprType::Mode));
829 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
833 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
834 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>
836 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
838 call_triangular_assignment_loop<SrcXprType::Mode, (SrcXprType::Mode&SelfAdjoint)==0>(dst, src, func);
842 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
843 struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>
845 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
847 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
852 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool SetOpposite>
853 struct triangular_assignment_loop
856 typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
857 typedef typename DstEvaluatorType::XprType DstXprType;
860 col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
861 row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
864 typedef typename Kernel::Scalar Scalar;
867 static inline void run(Kernel &kernel)
869 triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
872 kernel.assignDiagonalCoeff(row);
873 else if( ((Mode&
Lower) && row>col) || ((Mode&
Upper) && row<col) )
874 kernel.assignCoeff(row,col);
876 kernel.assignOppositeCoeff(row,col);
881 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
882 struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
885 static inline void run(Kernel &) {}
894 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
895 struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
897 typedef typename Kernel::Scalar Scalar;
899 static inline void run(Kernel &kernel)
901 for(
Index j = 0; j < kernel.cols(); ++j)
903 Index maxi = numext::mini(j, kernel.rows());
905 if (((Mode&
Lower) && SetOpposite) || (Mode&
Upper))
908 if(Mode&
Upper) kernel.assignCoeff(i, j);
909 else kernel.assignOppositeCoeff(i, j);
915 kernel.assignDiagonalCoeff(i++);
917 if (((Mode&
Upper) && SetOpposite) || (Mode&Lower))
919 for(; i < kernel.rows(); ++i)
920 if(Mode&Lower) kernel.assignCoeff(i, j);
921 else kernel.assignOppositeCoeff(i, j);
931 template<
typename Derived>
932 template<
typename DenseDerived>
935 other.
derived().resize(this->rows(), this->cols());
936 internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&
SelfAdjoint)==0 >(other.
derived(), derived().nestedExpression());
942 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
943 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
946 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::assign_op<Scalar,typename SrcXprType::Scalar> &)
948 Index dstRows = src.rows();
949 Index dstCols = src.cols();
950 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
951 dst.resize(dstRows, dstCols);
953 dst._assignProduct(src, 1, 0);
958 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
959 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
962 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)
964 dst._assignProduct(src, 1, 1);
969 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
970 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
973 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)
975 dst._assignProduct(src, -1, 1);
983 #endif // EIGEN_TRIANGULARMATRIX_H const Product< TriangularViewType, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Definition: TriangularMatrix.h:453
Scalar determinant() const
Definition: TriangularMatrix.h:309
const int HugeCost
Definition: Constants.h:39
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:71
Index outerStride() const
Definition: TriangularMatrix.h:360
NestedExpression & nestedExpression()
Definition: TriangularMatrix.h:237
TriangularViewType & setConstant(const Scalar &value)
Definition: TriangularMatrix.h:393
Definition: Constants.h:216
TransposeReturnType transpose()
Definition: TriangularMatrix.h:254
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:27
const unsigned int DirectAccessBit
Definition: Constants.h:150
const AdjointReturnType adjoint() const
Definition: TriangularMatrix.h:248
const SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView() const
Definition: TriangularMatrix.h:299
const unsigned int LvalueBit
Definition: Constants.h:139
friend const Product< OtherDerived, TriangularViewType > operator*(const MatrixBase< OtherDerived > &lhs, const TriangularViewImpl &rhs)
Definition: TriangularMatrix.h:462
Namespace containing all symbols from the Eigen library.
Definition: Core:287
TriangularViewType & setOnes()
Definition: TriangularMatrix.h:400
Derived & derived()
Definition: EigenBase.h:45
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:38
TriangularViewType & operator*=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:383
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
const unsigned int PacketAccessBit
Definition: Constants.h:89
const ConjugateReturnType conjugate() const
Definition: TriangularMatrix.h:242
Definition: EigenBase.h:29
bool isUpperTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:648
void copyCoeff(Index row, Index col, Other &other)
Definition: TriangularMatrix.h:84
Definition: Constants.h:204
void swap(MatrixBase< OtherDerived > const &other)
Definition: TriangularMatrix.h:530
Definition: Constants.h:208
Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:406
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
void swap(TriangularBase< OtherDerived > &other)
Definition: TriangularMatrix.h:517
void evalTo(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:601
TriangularViewType & operator/=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:386
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:49
Definition: Constants.h:218
Definition: Constants.h:214
Definition: Constants.h:206
TriangularViewType & setZero()
Definition: TriangularMatrix.h:397
Definition: Constants.h:210
Definition: Constants.h:212
Definition: Eigen_Colamd.h:50
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:673
Index rows() const
Definition: TriangularMatrix.h:226
Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:416
Definition: Constants.h:220
Index cols() const
Definition: TriangularMatrix.h:229
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:186
SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView()
Definition: TriangularMatrix.h:291
TriangularViewType & operator-=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:376
Definition: Constants.h:491
Index innerStride() const
Definition: TriangularMatrix.h:364
const int Dynamic
Definition: Constants.h:21
Pseudo expression representing a solving operation.
Definition: Solve.h:62
const NestedExpression & nestedExpression() const
Definition: TriangularMatrix.h:233
const ConstTransposeReturnType transpose() const
Definition: TriangularMatrix.h:264
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
const unsigned int LinearAccessBit
Definition: Constants.h:125
void fill(const Scalar &value)
Definition: TriangularMatrix.h:390
void evalToLazy(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:933
TriangularViewType & operator+=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:369