11#ifndef EIGEN_SPARSE_TRIANGULARVIEW_H
12#define EIGEN_SPARSE_TRIANGULARVIEW_H
30 SkipLast = !SkipFirst,
32 HasUnitDiag = (Mode&
UnitDiag) ? 1 : 0
50 template<typename RhsType, typename DstType>
55 this->solveInPlace(dst);
68template<
typename ArgType,
unsigned int Mode>
70 : evaluator_base<TriangularView<ArgType,Mode> >
76 typedef typename XprType::Scalar
Scalar;
77 typedef typename XprType::StorageIndex StorageIndex;
78 typedef typename evaluator<ArgType>::InnerIterator EvalIterator;
82 SkipLast = !SkipFirst,
84 HasUnitDiag = (Mode&
UnitDiag) ? 1 : 0
90 CoeffReadCost = evaluator<ArgType>::CoeffReadCost,
91 Flags = XprType::Flags
94 explicit unary_evaluator(
const XprType &xpr) : m_argImpl(xpr.nestedExpression()), m_arg(xpr.nestedExpression()) {}
96 inline Index nonZerosEstimate()
const {
97 return m_argImpl.nonZerosEstimate();
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());
157 else return Base::index();
161 if(HasUnitDiag && m_returnOne)
return Scalar(1);
162 else return Base::value();
174 const ArgType& m_arg;
179template<
typename Derived>
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
Definition SparseUtil.h:43
SCALAR Scalar
Definition bench_gemm.cpp:46
MatrixXf MatrixType
Definition benchmark-blocking-sizes.cpp:52
An InnerIterator allows to loop over the element of any matrix expression.
Definition CoreIterators.h:34
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Base class of any sparse matrices or sparse expressions.
Definition SparseMatrixBase.h:28
const TriangularView< const Derived, Mode > triangularView() const
Definition SparseTriangularView.h:182
MatrixType::Nested MatrixTypeNested
Definition SparseTriangularView.h:46
SparseMatrixBase< TriangularViewType > Base
Definition SparseTriangularView.h:41
void solveInPlace(MatrixBase< OtherDerived > &other) const
void solveInPlace(SparseMatrixBase< OtherDerived > &other) const
Definition TriangularMatrix.h:185
Expression of a triangular part in a matrix.
Definition TriangularMatrix.h:189
bool m_containsDiag
Definition SparseTriangularView.h:167
EIGEN_STRONG_INLINE InnerIterator & operator++()
Definition SparseTriangularView.h:123
bool m_returnOne
Definition SparseTriangularView.h:166
Scalar value() const
Definition SparseTriangularView.h:159
EIGEN_STRONG_INLINE InnerIterator(const unary_evaluator &xprEval, Index outer)
Definition SparseTriangularView.h:105
StorageIndex index() const
Definition SparseTriangularView.h:154
@ UnitDiag
Definition Constants.h:213
@ ZeroDiag
Definition Constants.h:215
@ Lower
Definition Constants.h:209
@ Upper
Definition Constants.h:211
const unsigned int RowMajorBit
Definition Constants.h:66
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE const T::Scalar * extract_data(const T &m)
Definition BlasUtil.h:533
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition BandTriangularSolver.h:13
CwiseBinaryOp< internal::scalar_sum_op< double, double >, const CpyMatrixXd, const CpyMatrixXd > XprType
Definition nestbyvalue.cpp:15
Definition Constants.h:510
Definition ForwardDeclarations.h:17
Definition CoreEvaluators.h:65