11#ifndef EIGEN_TRIANGULARMATRIX_H
12#define EIGEN_TRIANGULARMATRIX_H
18template<
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); }
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());
132 const int mode = int(Mode) & ~SelfAdjoint;
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 {}
169template<
typename MatrixType,
unsigned int _Mode>
170struct 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,
180 Flags = (MatrixTypeNestedCleaned::Flags & (HereditaryBits | FlagsLvalueBit) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)))
185template<
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)
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(); }
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>());
268 EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
269 typename MatrixType::TransposeReturnType tmp(m_matrix);
281 template<
typename Other>
289 template<
int S
ide,
typename Other>
291 inline const internal::triangular_solve_retval<Side,TriangularView, Other>
292 solve(
const MatrixBase<Other>& other)
const
293 {
return Base::template solve<Side>(other); }
328 return m_matrix.diagonal().prod();
333 MatrixTypeNested m_matrix;
345template<
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>());
402 void fill(
const Scalar& value) { setConstant(value); }
406 {
return *
this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
420 Base::check_coordinates_internal(row, col);
421 return derived().nestedExpression().coeff(row, col);
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
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
570template<
typename MatrixType,
unsigned int Mode>
571template<
typename OtherDerived>
572EIGEN_DEVICE_FUNC
inline TriangularView<MatrixType, Mode>&
573TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
const MatrixBase<OtherDerived>& other)
575 internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
580template<
typename MatrixType,
unsigned int Mode>
581template<
typename OtherDerived>
582EIGEN_DEVICE_FUNC
void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
const MatrixBase<OtherDerived>& other)
584 internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
589template<
typename MatrixType,
unsigned int Mode>
590template<
typename OtherDerived>
591EIGEN_DEVICE_FUNC
inline TriangularView<MatrixType, Mode>&
592TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
const TriangularBase<OtherDerived>& other)
594 eigen_assert(Mode ==
int(OtherDerived::Mode));
595 internal::call_assignment(derived(), other.derived());
599template<
typename MatrixType,
unsigned int Mode>
600template<
typename OtherDerived>
601EIGEN_DEVICE_FUNC
void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
const TriangularBase<OtherDerived>& other)
603 eigen_assert(Mode ==
int(OtherDerived::Mode));
604 internal::call_assignment_no_alias(derived(), other.derived());
614template<
typename Derived>
615template<
typename DenseDerived>
640template<
typename Derived>
641template<
unsigned int Mode>
650template<
typename Derived>
651template<
unsigned int Mode>
664template<
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;
689template<
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;
722template<
typename MatrixType,
unsigned int 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;
729template<
typename MatrixType,
unsigned int Mode>
730struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
731 : evaluator<typename internal::remove_all<MatrixType>::type>
733 typedef TriangularView<MatrixType,Mode> XprType;
734 typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
736 unary_evaluator(
const XprType &xpr) : Base(xpr.nestedExpression()) {}
740struct Triangular2Triangular {};
741struct Triangular2Dense {};
742struct Dense2Triangular {};
745template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool ClearOpposite>
struct triangular_assignment_loop;
753template<
int UpLo,
int Mode,
int SetOpposite,
typename DstEvaluatorTypeT,
typename SrcEvaluatorTypeT,
typename Functor,
int Version = Specialized>
754class 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));
800template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType,
typename Functor>
801EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
802void 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);
828template<
int Mode,
bool SetOpposite,
typename DstXprType,
typename SrcXprType>
829EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
830void 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>());
835template<>
struct AssignmentKind<TriangularShape,TriangularShape> {
typedef Triangular2Triangular Kind; };
836template<>
struct AssignmentKind<DenseShape,TriangularShape> {
typedef Triangular2Dense Kind; };
837template<>
struct AssignmentKind<TriangularShape,DenseShape> {
typedef Dense2Triangular Kind; };
840template<
typename DstXprType,
typename SrcXprType,
typename Functor>
841struct 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);
851template<
typename DstXprType,
typename SrcXprType,
typename Functor>
852struct 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);
860template<
typename DstXprType,
typename SrcXprType,
typename Functor>
861struct 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);
870template<
typename Kernel,
unsigned int Mode,
int UnrollCount,
bool SetOpposite>
871struct 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);
899template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
900struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
903 static inline void run(Kernel &) {}
912template<
typename Kernel,
unsigned int Mode,
bool SetOpposite>
913struct 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);
949template<
typename Derived>
950template<
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());
960template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
961struct 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);
976template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
977struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
979 typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
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);
987template<
typename DstXprType,
typename Lhs,
typename Rhs,
typename Scalar>
988struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
990 typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
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);
Base class for all dense matrices, vectors, and arrays.
Definition: DenseBase.h:47
Derived & derived()
Definition: EigenBase.h:46
Expression of a diagonal/subdiagonal/superdiagonal in a matrix.
Definition: Diagonal.h:65
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:50
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:75
Expression of a selfadjoint matrix from a triangular part of a dense matrix.
Definition: SelfAdjointView.h:51
Pseudo expression representing a solving operation.
Definition: Solve.h:63
Base class for triangular part in a matrix.
Definition: TriangularMatrix.h:28
void copyCoeff(Index row, Index col, Other &other)
Definition: TriangularMatrix.h:85
void evalTo(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:616
@ SizeAtCompileTime
Definition: TriangularMatrix.h:38
void evalToLazy(MatrixBase< DenseDerived > &other) const
Definition: TriangularMatrix.h:951
TriangularViewType & setZero()
Definition: TriangularMatrix.h:409
EIGEN_DEPRECATED void swap(MatrixBase< OtherDerived > const &other)
Definition: TriangularMatrix.h:541
TriangularViewType & operator*=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:395
void solveInPlace(const MatrixBase< OtherDerived > &other) const
void swap(TriangularBase< OtherDerived > &other)
Definition: TriangularMatrix.h:528
TriangularViewType & operator=(const TriangularBase< OtherDerived > &other)
Scalar coeff(Index row, Index col) const
Definition: TriangularMatrix.h:418
Scalar & coeffRef(Index row, Index col)
Definition: TriangularMatrix.h:428
const internal::triangular_solve_retval< Side, TriangularViewType, Other > solve(const MatrixBase< Other > &other) const
friend const Product< OtherDerived, TriangularViewType > operator*(const MatrixBase< OtherDerived > &lhs, const TriangularViewImpl &rhs)
Definition: TriangularMatrix.h:474
TriangularViewType & operator=(const MatrixBase< OtherDerived > &other)
TriangularViewType & operator/=(const typename internal::traits< MatrixType >::Scalar &other)
Definition: TriangularMatrix.h:398
const Product< TriangularViewType, OtherDerived > operator*(const MatrixBase< OtherDerived > &rhs) const
Definition: TriangularMatrix.h:465
void fill(const Scalar &value)
Definition: TriangularMatrix.h:402
TriangularViewType & operator-=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:388
TriangularViewType & setOnes()
Definition: TriangularMatrix.h:412
Index innerStride() const
Definition: TriangularMatrix.h:376
TriangularViewType & operator+=(const DenseBase< Other > &other)
Definition: TriangularMatrix.h:381
TriangularViewType & setConstant(const Scalar &value)
Definition: TriangularMatrix.h:405
Index outerStride() const
Definition: TriangularMatrix.h:372
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:189
EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:229
EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: TriangularMatrix.h:226
const SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView() const
Definition: TriangularMatrix.h:311
const ConjugateReturnType conjugate() const
Definition: TriangularMatrix.h:242
NestedExpression & nestedExpression()
Definition: TriangularMatrix.h:237
internal::conditional< Cond, ConjugateReturnType, ConstTriangularView >::type conjugateIf() const
Definition: TriangularMatrix.h:251
const ConstTransposeReturnType transpose() const
Definition: TriangularMatrix.h:276
const AdjointReturnType adjoint() const
Definition: TriangularMatrix.h:260
Scalar determinant() const
Definition: TriangularMatrix.h:321
SelfAdjointView< MatrixTypeNestedNonRef, Mode > selfadjointView()
Definition: TriangularMatrix.h:303
TransposeReturnType transpose()
Definition: TriangularMatrix.h:266
const NestedExpression & nestedExpression() const
Definition: TriangularMatrix.h:233
@ StrictlyLower
Definition: Constants.h:221
@ UnitDiag
Definition: Constants.h:213
@ StrictlyUpper
Definition: Constants.h:223
@ UnitLower
Definition: Constants.h:217
@ ZeroDiag
Definition: Constants.h:215
@ SelfAdjoint
Definition: Constants.h:225
@ UnitUpper
Definition: Constants.h:219
@ Lower
Definition: Constants.h:209
@ Upper
Definition: Constants.h:211
const unsigned int LvalueBit
Definition: Constants.h:144
Namespace containing all symbols from the Eigen library.
Definition: Core:141
const int HugeCost
Definition: Constants.h:44
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const int Dynamic
Definition: Constants.h:22
Definition: Constants.h:507
Definition: EigenBase.h:30
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:39
Derived & derived()
Definition: EigenBase.h:46