11 #ifndef EIGEN_SPARSE_TRIANGULARVIEW_H 12 #define EIGEN_SPARSE_TRIANGULARVIEW_H 30 SkipLast = !SkipFirst,
32 HasUnitDiag = (Mode&
UnitDiag) ? 1 : 0
44 EIGEN_SPARSE_PUBLIC_INTERFACE(TriangularViewType)
46 typedef typename MatrixType::Nested MatrixTypeNested;
50 template<
typename RhsType,
typename DstType>
52 EIGEN_STRONG_INLINE
void _solve_impl(
const RhsType &rhs, DstType &dst)
const {
55 this->solveInPlace(dst);
65 template<
typename ArgType,
unsigned int Mode>
73 typedef typename XprType::Scalar Scalar;
74 typedef typename XprType::StorageIndex StorageIndex;
79 SkipLast = !SkipFirst,
81 HasUnitDiag = (Mode&
UnitDiag) ? 1 : 0
88 Flags = XprType::Flags
93 inline Index nonZerosEstimate()
const {
94 return m_argImpl.nonZerosEstimate();
99 typedef EvalIterator Base;
103 : Base(xprEval.m_argImpl,outer), m_returnOne(
false), m_containsDiag(Base::outer()<xprEval.m_arg.innerSize())
107 while((*
this) && ((HasUnitDiag||SkipDiag) ? this->index()<=outer : this->index()<outer))
110 m_returnOne = m_containsDiag;
112 else if(HasUnitDiag && ((!Base::operator
bool()) || Base::index()>=Base::outer()))
114 if((!SkipFirst) && Base::operator
bool())
116 m_returnOne = m_containsDiag;
120 EIGEN_STRONG_INLINE InnerIterator& operator++()
122 if(HasUnitDiag && m_returnOne)
127 if(HasUnitDiag && (!SkipFirst) && ((!Base::operator
bool()) || Base::index()>=Base::outer()))
129 if((!SkipFirst) && Base::operator
bool())
131 m_returnOne = m_containsDiag;
137 EIGEN_STRONG_INLINE
operator bool()
const 139 if(HasUnitDiag && m_returnOne)
141 if(SkipFirst)
return Base::operator bool();
144 if (SkipDiag)
return (Base::operator
bool() && this->index() < this->outer());
145 else return (Base::operator
bool() && this->index() <= this->outer());
151 inline StorageIndex index()
const 153 if(HasUnitDiag && m_returnOne)
return internal::convert_index<StorageIndex>(Base::outer());
154 else return Base::index();
156 inline Scalar value()
const 158 if(HasUnitDiag && m_returnOne)
return Scalar(1);
159 else return Base::value();
171 const ArgType& m_arg;
176 template<
typename Derived>
186 #endif // EIGEN_SPARSE_TRIANGULARVIEW_H
Definition: CoreEvaluators.h:90
Definition: CoreEvaluators.h:65
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:61
Definition: Constants.h:529
Definition: CoreEvaluators.h:109
Base class of any sparse matrices or sparse expressions.
Definition: ForwardDeclarations.h:281
View matrix as a lower triangular matrix.
Definition: Constants.h:204
Matrix has ones on the diagonal; to be used in combination with Lower or Upper.
Definition: Constants.h:208
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
The type used to identify a general sparse storage.
Definition: Constants.h:494
View matrix as an upper triangular matrix.
Definition: Constants.h:206
Matrix has zeros on the diagonal; to be used in combination with Lower or Upper.
Definition: Constants.h:210
Definition: BandTriangularSolver.h:13
Definition: TriangularMatrix.h:184
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:186
EIGEN_DEVICE_FUNC const NestedExpression & nestedExpression() const
Definition: TriangularMatrix.h:233
Base class for all dense matrices, vectors, and expressions.
Definition: MatrixBase.h:48
An InnerIterator allows to loop over the element of any matrix expression.
Definition: CoreIterators.h:33