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;
58 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
59 inline Index rows()
const EIGEN_NOEXCEPT {
return derived().rows(); }
60 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
61 inline Index cols()
const EIGEN_NOEXCEPT {
return derived().cols(); }
62 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
63 inline Index outerStride()
const EIGEN_NOEXCEPT {
return derived().outerStride(); }
64 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
65 inline Index innerStride()
const EIGEN_NOEXCEPT {
return derived().innerStride(); }
71 EIGEN_UNUSED_VARIABLE(rows);
72 EIGEN_UNUSED_VARIABLE(cols);
73 eigen_assert(rows==this->rows() && cols==this->cols());
77 inline Scalar coeff(
Index row,
Index col)
const {
return derived().coeff(row,col); }
79 inline Scalar& coeffRef(
Index row,
Index col) {
return derived().coeffRef(row,col); }
83 template<
typename Other>
87 derived().coeffRef(row, col) = other.coeff(row, col);
91 inline Scalar operator()(
Index row,
Index col)
const 93 check_coordinates(row, col);
94 return coeff(row,col);
97 inline Scalar& operator()(
Index row,
Index col)
99 check_coordinates(row, col);
100 return coeffRef(row,col);
103 #ifndef EIGEN_PARSED_BY_DOXYGEN 105 inline const Derived& derived()
const {
return *
static_cast<const Derived*
>(
this); }
107 inline Derived& derived() {
return *
static_cast<Derived*
>(
this); }
108 #endif // not EIGEN_PARSED_BY_DOXYGEN 110 template<
typename DenseDerived>
113 template<
typename DenseDerived>
118 DenseMatrixType toDenseMatrix()
const 120 DenseMatrixType res(rows(), cols());
127 void check_coordinates(
Index row,
Index col)
const 129 EIGEN_ONLY_USED_FOR_DEBUG(row);
130 EIGEN_ONLY_USED_FOR_DEBUG(col);
131 eigen_assert(col>=0 && col<cols() && row>=0 && row<rows());
133 EIGEN_ONLY_USED_FOR_DEBUG(mode);
134 eigen_assert((mode==
Upper && col>=row)
135 || (mode==
Lower && col<=row)
140 #ifdef EIGEN_INTERNAL_DEBUGGING 141 void check_coordinates_internal(
Index row,
Index col)
const 143 check_coordinates(row, col);
146 void check_coordinates_internal(
Index ,
Index )
const {}
169 template<
typename MatrixType,
unsigned int _Mode>
170 struct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType>
172 typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
173 typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
174 typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
175 typedef typename MatrixType::PlainObject FullMatrixType;
176 typedef MatrixType ExpressionType;
179 FlagsLvalueBit = is_lvalue<MatrixType>::value ?
LvalueBit : 0,
185 template<
typename _MatrixType,
unsigned int _Mode,
typename StorageKind>
class TriangularViewImpl;
188 :
public TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind >
192 typedef TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind > Base;
193 typedef typename internal::traits<TriangularView>::Scalar Scalar;
194 typedef _MatrixType MatrixType;
197 typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;
198 typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
200 typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
205 typedef typename internal::traits<TriangularView>::StorageKind StorageKind;
206 typedef typename internal::traits<TriangularView>::MatrixTypeNestedCleaned NestedExpression;
210 Flags = internal::traits<TriangularView>::Flags,
215 IsVectorAtCompileTime =
false 219 explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix)
222 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TriangularView)
225 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
226 inline Index rows() const EIGEN_NOEXCEPT {
return m_matrix.rows(); }
228 EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
229 inline Index cols() const EIGEN_NOEXCEPT {
return m_matrix.cols(); }
243 {
return ConjugateReturnType(m_matrix.conjugate()); }
250 inline typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type
253 typedef typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type ReturnType;
254 return ReturnType(m_matrix.template conjugateIf<Cond>());
260 inline const AdjointReturnType
adjoint()
const 261 {
return AdjointReturnType(m_matrix.adjoint()); }
268 EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
269 typename MatrixType::TransposeReturnType tmp(m_matrix);
270 return TransposeReturnType(tmp);
278 return ConstTransposeReturnType(m_matrix.transpose());
281 template<
typename Other>
289 template<
int S
ide,
typename Other>
291 inline const internal::triangular_solve_retval<Side,TriangularView, Other>
293 {
return Base::template solve<Side>(other); }
328 return m_matrix.diagonal().prod();
333 MatrixTypeNested m_matrix;
345 template<
typename _MatrixType,
unsigned int _Mode>
class TriangularViewImpl<_MatrixType,_Mode,
Dense>
352 typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
354 typedef _MatrixType MatrixType;
355 typedef typename MatrixType::PlainObject DenseMatrixType;
356 typedef DenseMatrixType PlainObject;
359 using Base::evalToLazy;
362 typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
366 Flags = internal::traits<TriangularViewType>::Flags
379 template<
typename Other>
382 internal::call_assignment_no_alias(derived(), other.
derived(), internal::add_assign_op<Scalar,typename Other::Scalar>());
386 template<
typename Other>
389 internal::call_assignment_no_alias(derived(), other.
derived(), internal::sub_assign_op<Scalar,typename Other::Scalar>());
395 TriangularViewType&
operator*=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().
nestedExpression() * other; }
398 TriangularViewType&
operator/=(
const typename internal::traits<MatrixType>::Scalar& other) {
return *
this = derived().
nestedExpression() / other; }
402 void fill(
const Scalar& value) { setConstant(value); }
406 {
return *
this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
409 TriangularViewType&
setZero() {
return setConstant(Scalar(0)); }
412 TriangularViewType&
setOnes() {
return setConstant(Scalar(1)); }
420 Base::check_coordinates_internal(row, col);
421 return derived().nestedExpression().coeff(row, col);
430 EIGEN_STATIC_ASSERT_LVALUE(TriangularViewType);
431 Base::check_coordinates_internal(row, col);
432 return derived().nestedExpression().coeffRef(row, col);
436 template<
typename OtherDerived>
441 template<
typename OtherDerived>
445 #ifndef EIGEN_PARSED_BY_DOXYGEN 447 TriangularViewType& operator=(
const TriangularViewImpl& other)
448 {
return *
this = other.derived().nestedExpression(); }
450 template<
typename OtherDerived>
452 EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
455 template<
typename OtherDerived>
457 EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
462 template<
typename OtherDerived>
471 template<
typename OtherDerived>
friend 502 template<
int S
ide,
typename Other>
503 inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
515 template<
int S
ide,
typename OtherDerived>
519 template<
typename OtherDerived>
522 {
return solveInPlace<OnTheLeft>(other); }
525 template<
typename OtherDerived>
527 #ifdef EIGEN_PARSED_BY_DOXYGEN 533 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
534 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
538 template<
typename OtherDerived>
540 EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
543 EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
544 call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
547 template<
typename RhsType,
typename DstType>
549 EIGEN_STRONG_INLINE
void _solve_impl(
const RhsType &rhs, DstType &dst)
const {
550 if(!internal::is_same_dense(dst,rhs))
552 this->solveInPlace(dst);
555 template<
typename ProductType>
557 EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(
const ProductType& prod,
const Scalar& alpha,
bool beta);
559 EIGEN_DEFAULT_COPY_CONSTRUCTOR(TriangularViewImpl)
560 EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TriangularViewImpl)
568 #ifndef EIGEN_PARSED_BY_DOXYGEN 570 template<
typename MatrixType,
unsigned int Mode>
571 template<
typename OtherDerived>
575 internal::call_assignment_no_alias(derived(), other.
derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
580 template<
typename MatrixType,
unsigned int Mode>
581 template<
typename OtherDerived>
582 EIGEN_DEVICE_FUNC
void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
const MatrixBase<OtherDerived>& other)
584 internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
589 template<
typename MatrixType,
unsigned int Mode>
590 template<
typename OtherDerived>
594 eigen_assert(Mode ==
int(OtherDerived::Mode));
595 internal::call_assignment(derived(), other.
derived());
599 template<
typename MatrixType,
unsigned int Mode>
600 template<
typename OtherDerived>
603 eigen_assert(Mode ==
int(OtherDerived::Mode));
604 internal::call_assignment_no_alias(derived(), other.
derived());
614 template<
typename Derived>
615 template<
typename DenseDerived>
640 template<
typename Derived>
641 template<
unsigned int Mode>
646 return typename TriangularViewReturnType<Mode>::Type(derived());
650 template<
typename Derived>
651 template<
unsigned int Mode>
656 return typename ConstTriangularViewReturnType<Mode>::Type(derived());
664 template<
typename Derived>
667 RealScalar maxAbsOnUpperPart =
static_cast<RealScalar
>(-1);
668 for(
Index j = 0; j < cols(); ++j)
670 Index maxi = numext::mini(j, rows()-1);
671 for(
Index i = 0; i <= maxi; ++i)
673 RealScalar absValue = numext::abs(coeff(i,j));
674 if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
677 RealScalar threshold = maxAbsOnUpperPart * prec;
678 for(
Index j = 0; j < cols(); ++j)
679 for(
Index i = j+1; i < rows(); ++i)
680 if(numext::abs(coeff(i, j)) > threshold)
return false;
689 template<
typename Derived>
692 RealScalar maxAbsOnLowerPart =
static_cast<RealScalar
>(-1);
693 for(
Index j = 0; j < cols(); ++j)
694 for(
Index i = j; i < rows(); ++i)
696 RealScalar absValue = numext::abs(coeff(i,j));
697 if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
699 RealScalar threshold = maxAbsOnLowerPart * prec;
700 for(
Index j = 1; j < cols(); ++j)
702 Index maxi = numext::mini(j, rows()-1);
703 for(
Index i = 0; i < maxi; ++i)
704 if(numext::abs(coeff(i, j)) > threshold)
return false;
722 template<
typename MatrixType,
unsigned int Mode>
723 struct evaluator_traits<TriangularView<MatrixType,Mode> >
725 typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;
726 typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;
729 template<
typename MatrixType,
unsigned int Mode>
730 struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
731 : evaluator<typename internal::remove_all<MatrixType>::type>
734 typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
736 unary_evaluator(
const XprType &xpr) : Base(xpr.nestedExpression()) {}
740 struct Triangular2Triangular {};
741 struct Triangular2Dense {};
742 struct Dense2Triangular {};
745 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool ClearOpposite>
struct triangular_assignment_loop;
753 template<
int UpLo,
int Mode,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version = Specialized>
754 class triangular_dense_assignment_kernel :
public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
757 typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;
758 typedef typename Base::DstXprType DstXprType;
759 typedef typename Base::SrcXprType SrcXprType;
762 using Base::m_functor;
765 typedef typename Base::DstEvaluatorType DstEvaluatorType;
766 typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
767 typedef typename Base::Scalar Scalar;
768 typedef typename Base::AssignmentTraits AssignmentTraits;
771 EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst,
const SrcEvaluatorType &src,
const Functor &func, DstXprType& dstExpr)
772 : Base(dst, src, func, dstExpr)
775 #ifdef EIGEN_INTERNAL_DEBUGGING 776 EIGEN_DEVICE_FUNC
void assignCoeff(
Index row,
Index col)
778 eigen_internal_assert(row!=col);
779 Base::assignCoeff(row,col);
782 using Base::assignCoeff;
785 EIGEN_DEVICE_FUNC
void assignDiagonalCoeff(
Index id)
787 if(Mode==
UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(1));
788 else if(Mode==
ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(
id,
id), Scalar(0));
789 else if(Mode==0) Base::assignCoeff(
id,
id);
792 EIGEN_DEVICE_FUNC
void assignOppositeCoeff(
Index row,
Index col)
794 eigen_internal_assert(row!=col);
796 m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
800 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType,
typename Functor>
801 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
802 void call_triangular_assignment_loop(DstXprType& dst,
const SrcXprType& src,
const Functor &func)
804 typedef evaluator<DstXprType> DstEvaluatorType;
805 typedef evaluator<SrcXprType> SrcEvaluatorType;
807 SrcEvaluatorType srcEvaluator(src);
809 Index dstRows = src.rows();
810 Index dstCols = src.cols();
811 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
812 dst.resize(dstRows, dstCols);
813 DstEvaluatorType dstEvaluator(dst);
816 DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
817 Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
820 unroll = DstXprType::SizeAtCompileTime !=
Dynamic 821 && SrcEvaluatorType::CoeffReadCost <
HugeCost 822 && DstXprType::SizeAtCompileTime * (int(DstEvaluatorType::CoeffReadCost) + int(SrcEvaluatorType::CoeffReadCost)) / 2 <= EIGEN_UNROLLING_LIMIT
825 triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);
828 template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType>
829 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
830 void call_triangular_assignment_loop(DstXprType& dst,
const SrcXprType& src)
832 call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());
835 template<>
struct AssignmentKind<TriangularShape,TriangularShape> {
typedef Triangular2Triangular Kind; };
836 template<>
struct AssignmentKind<DenseShape,TriangularShape> {
typedef Triangular2Dense Kind; };
837 template<>
struct AssignmentKind<TriangularShape,DenseShape> {
typedef Dense2Triangular Kind; };
840 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
841 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
843 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
845 eigen_assert(
int(DstXprType::Mode) ==
int(SrcXprType::Mode));
847 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
851 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
852 struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>
854 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
856 call_triangular_assignment_loop<SrcXprType::Mode, (int(SrcXprType::Mode) & int(SelfAdjoint)) == 0>(dst, src, func);
860 template<
typename DstXprType,
typename SrcXprType,
typename Functor>
861 struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>
863 EIGEN_DEVICE_FUNC
static void run(DstXprType &dst,
const SrcXprType &src,
const Functor &func)
865 call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
870 template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool SetOpposite>
871 struct triangular_assignment_loop
874 typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
875 typedef typename DstEvaluatorType::XprType DstXprType;
878 col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
879 row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
882 typedef typename Kernel::Scalar Scalar;
885 static inline void run(Kernel &kernel)
887 triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
890 kernel.assignDiagonalCoeff(row);
891 else if( ((Mode&
Lower) && row>col) || ((Mode&
Upper) && row<col) )
892 kernel.assignCoeff(row,col);
894 kernel.assignOppositeCoeff(row,col);
899 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
900 struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
903 static inline void run(Kernel &) {}
912 template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
913 struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
915 typedef typename Kernel::Scalar Scalar;
917 static inline void run(Kernel &kernel)
919 for(
Index j = 0; j < kernel.cols(); ++j)
921 Index maxi = numext::mini(j, kernel.rows());
923 if (((Mode&
Lower) && SetOpposite) || (Mode&
Upper))
926 if(Mode&
Upper) kernel.assignCoeff(i, j);
927 else kernel.assignOppositeCoeff(i, j);
933 kernel.assignDiagonalCoeff(i++);
935 if (((Mode&
Upper) && SetOpposite) || (Mode&Lower))
937 for(; i < kernel.rows(); ++i)
938 if(Mode&Lower) kernel.assignCoeff(i, j);
939 else kernel.assignOppositeCoeff(i, j);
949 template<
typename Derived>
950 template<
typename DenseDerived>
953 other.
derived().resize(this->rows(), this->cols());
954 internal::call_triangular_assignment_loop<Derived::Mode, (int(Derived::Mode) & int(
SelfAdjoint)) == 0 >(other.
derived(), derived().nestedExpression());
960 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
961 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
964 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::assign_op<Scalar,typename SrcXprType::Scalar> &)
966 Index dstRows = src.rows();
967 Index dstCols = src.cols();
968 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
969 dst.resize(dstRows, dstCols);
971 dst._assignProduct(src, Scalar(1),
false);
976 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
977 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
980 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)
982 dst._assignProduct(src, Scalar(1),
true);
987 template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
988 struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
991 static void run(DstXprType &dst,
const SrcXprType &src,
const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)
993 dst._assignProduct(src, Scalar(-1),
true);
1001 #endif // EIGEN_TRIANGULARMATRIX_H const Product< TriangularViewType, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Definition: TriangularMatrix.h:465
Scalar determinant() const
Definition: TriangularMatrix.h:321
const int HugeCost
Definition: Constants.h:44
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:226
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:71
Index outerStride() const
Definition: TriangularMatrix.h:372
NestedExpression & nestedExpression()
Definition: TriangularMatrix.h:237
TriangularViewType & setConstant(const Scalar &value)
Definition: TriangularMatrix.h:405
Definition: Constants.h:221
TransposeReturnType transpose()
Definition: TriangularMatrix.h:266
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:27
const unsigned int DirectAccessBit
Definition: Constants.h:155
const AdjointReturnType adjoint() const
Definition: TriangularMatrix.h:260
const SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView() const
Definition: TriangularMatrix.h:311
const unsigned int LvalueBit
Definition: Constants.h:144
friend const Product< OtherDerived, TriangularViewType > operator*(const MatrixBase< OtherDerived > &lhs, const TriangularViewImpl &rhs)
Definition: TriangularMatrix.h:474
Namespace containing all symbols from the Eigen library.
Definition: Core:141
TriangularViewType & setOnes()
Definition: TriangularMatrix.h:412
Derived & derived()
Definition: EigenBase.h:46
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
TriangularViewType & operator*=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:395
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:41
const unsigned int PacketAccessBit
Definition: Constants.h:94
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:665
void copyCoeff(Index row, Index col, Other &other)
Definition: TriangularMatrix.h:85
Definition: Constants.h:209
Definition: Constants.h:213
Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:418
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
void swap(TriangularBase< OtherDerived > &other)
Definition: TriangularMatrix.h:528
void evalTo(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:616
TriangularViewType & operator/=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:398
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:49
Definition: Constants.h:223
internal::conditional< Cond, ConjugateReturnType, ConstTriangularView >::type conjugateIf() const
Definition: TriangularMatrix.h:251
Definition: Constants.h:219
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:229
Definition: Constants.h:211
EIGEN_DEPRECATED void swap(MatrixBase< OtherDerived > const &other)
Definition: TriangularMatrix.h:541
TriangularViewType & setZero()
Definition: TriangularMatrix.h:409
Definition: Constants.h:215
Definition: Constants.h:217
Definition: Eigen_Colamd.h:50
bool isLowerTriangular(const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
Definition: TriangularMatrix.h:690
Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:428
Definition: Constants.h:225
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:187
SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView()
Definition: TriangularMatrix.h:303
TriangularViewType & operator-=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:388
Definition: Constants.h:507
Index innerStride() const
Definition: TriangularMatrix.h:376
const int Dynamic
Definition: Constants.h:22
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:276
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
const unsigned int LinearAccessBit
Definition: Constants.h:130
void fill(const Scalar &value)
Definition: TriangularMatrix.h:402
void evalToLazy(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:951
TriangularViewType & operator+=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:381