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);
68 template<
typename ArgType,
unsigned int Mode>
82 SkipLast = !SkipFirst,
91 Flags = XprType::Flags
94 explicit unary_evaluator(
const XprType &xpr) : m_argImpl(xpr.nestedExpression()), m_arg(xpr.nestedExpression()) {}
97 return m_argImpl.nonZerosEstimate();
106 : Base(xprEval.m_argImpl,outer), m_returnOne(false), m_containsDiag(Base::outer()<xprEval.m_arg.innerSize())
110 while((*
this) && ((HasUnitDiag||SkipDiag) ? this->index()<=outer : this->index()<outer))
113 m_returnOne = m_containsDiag;
115 else if(HasUnitDiag && ((!Base::operator
bool()) || Base::index()>=Base::outer()))
117 if((!SkipFirst) && Base::operator
bool())
119 m_returnOne = m_containsDiag;
125 if(HasUnitDiag && m_returnOne)
130 if(HasUnitDiag && (!SkipFirst) && ((!Base::operator
bool()) || Base::index()>=Base::outer()))
132 if((!SkipFirst) && Base::operator
bool())
134 m_returnOne = m_containsDiag;
142 if(HasUnitDiag && m_returnOne)
144 if(SkipFirst)
return Base::operator bool();
147 if (SkipDiag)
return (Base::operator
bool() && this->index() < this->outer());
148 else return (Base::operator
bool() && this->index() <= this->outer());
156 if(HasUnitDiag && m_returnOne)
return internal::convert_index<StorageIndex>(Base::outer());
157 else return Base::index();
161 if(HasUnitDiag && m_returnOne)
return Scalar(1);
162 else return Base::value();
179 template<
typename Derived>
189 #endif // EIGEN_SPARSE_TRIANGULARVIEW_H unary_evaluator(const XprType &xpr)
#define EIGEN_STRONG_INLINE
MatrixType::Nested MatrixTypeNested
StorageIndex index() const
evaluator< ArgType >::InnerIterator EvalIterator
const TriangularView< const Derived, Mode > triangularView() const
evaluator< ArgType > m_argImpl
const unsigned int RowMajorBit
Index nonZerosEstimate() const
internal::traits< TriangularView >::Scalar Scalar
XprType::StorageIndex StorageIndex
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
Base class of any sparse matrices or sparse expressions.
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
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.