11 #ifndef EIGEN_SPARSE_TRIANGULARVIEW_H 12 #define EIGEN_SPARSE_TRIANGULARVIEW_H 30 SkipLast = !SkipFirst,
50 template<typename RhsType, typename DstType>
55 this->solveInPlace(dst);
65 template<
typename ArgType,
unsigned int Mode>
79 SkipLast = !SkipFirst,
88 Flags = XprType::Flags
91 explicit unary_evaluator(
const XprType &xpr) : m_argImpl(xpr.nestedExpression()), m_arg(xpr.nestedExpression()) {}
94 return m_argImpl.nonZerosEstimate();
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;
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;
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());
153 if(HasUnitDiag && m_returnOne)
return internal::convert_index<StorageIndex>(Base::outer());
154 else return Base::index();
158 if(HasUnitDiag && m_returnOne)
return Scalar(1);
159 else return Base::value();
176 template<
typename Derived>
186 #endif // EIGEN_SPARSE_TRIANGULARVIEW_H Index nonZerosEstimate() const
unary_evaluator(const XprType &xpr)
#define EIGEN_STRONG_INLINE
MatrixType::Nested MatrixTypeNested
evaluator< ArgType >::InnerIterator EvalIterator
StorageIndex index() const
evaluator< ArgType > m_argImpl
const unsigned int RowMajorBit
internal::traits< TriangularView >::Scalar Scalar
XprType::StorageIndex StorageIndex
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
Base class of any sparse matrices or sparse expressions.
internal::remove_all< MatrixTypeNested >::type MatrixTypeNestedCleaned
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &xprEval, Index outer)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_STRONG_INLINE InnerIterator & operator++()
SparseMatrixBase< TriangularViewType > Base
const TriangularView< const Derived, Mode > triangularView() const
TriangularView< ArgType, Mode > XprType
internal::remove_reference< MatrixTypeNested >::type MatrixTypeNestedNonRef
Expression of a triangular part in a matrix.
const T::Scalar * extract_data(const T &m)
Base class for all dense matrices, vectors, and expressions.
TriangularView< MatrixType, Mode > TriangularViewType
An InnerIterator allows to loop over the element of any matrix expression.