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>
82 SkipLast = !SkipFirst,
84 HasUnitDiag = (Mode&
UnitDiag) ? 1 : 0
91 Flags = XprType::Flags
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();
179template<
typename Derived>
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived)
Definition: SparseUtil.h:43
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
Expression of a triangular part in a matrix.
Definition: TriangularMatrix.h:189
internal::traits< TriangularView >::Scalar Scalar
Definition: TriangularMatrix.h:193
MatrixType::Nested MatrixTypeNested
Definition: SparseTriangularView.h:46
SparseMatrixBase< TriangularViewType > Base
Definition: SparseTriangularView.h:41
void solveInPlace(MatrixBase< OtherDerived > &other) const
Applies the inverse of *this to the dense vector or matrix other, "in-place".
internal::remove_all< MatrixTypeNested >::type MatrixTypeNestedCleaned
Definition: SparseTriangularView.h:48
void solveInPlace(SparseMatrixBase< OtherDerived > &other) const
Applies the inverse of *this to the sparse vector or matrix other, "in-place".
internal::remove_reference< MatrixTypeNested >::type MatrixTypeNestedNonRef
Definition: SparseTriangularView.h:47
Definition: TriangularMatrix.h:185
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
type
Definition: core.h:575
@ UnitDiag
Matrix has ones on the diagonal; to be used in combination with Lower or Upper.
Definition: Constants.h:213
@ ZeroDiag
Matrix has zeros on the diagonal; to be used in combination with Lower or Upper.
Definition: Constants.h:215
@ Lower
View matrix as a lower triangular matrix.
Definition: Constants.h:209
@ Upper
View matrix as an upper triangular matrix.
Definition: Constants.h:211
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
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: MatrixExponential.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
GHC_FS_API uintmax_t remove_all(const path &p, std::error_code &ec) noexcept
Definition: filesystem.hpp:4732
Definition: Eigen_Colamd.h:50
unit_t< Units, T, NonLinearScale > & operator++(unit_t< Units, T, NonLinearScale > &u) noexcept
Definition: base.h:2335
The type used to identify a general sparse storage.
Definition: Constants.h:510
Definition: Constants.h:545
Definition: CoreEvaluators.h:111
Definition: CoreEvaluators.h:91
const ArgType & m_arg
Definition: SparseTriangularView.h:174
XprType::StorageIndex StorageIndex
Definition: SparseTriangularView.h:77
TriangularView< ArgType, Mode > XprType
Definition: SparseTriangularView.h:72
Index nonZerosEstimate() const
Definition: SparseTriangularView.h:96
XprType::Scalar Scalar
Definition: SparseTriangularView.h:76
evaluator< ArgType > m_argImpl
Definition: SparseTriangularView.h:173
evaluator< ArgType >::InnerIterator EvalIterator
Definition: SparseTriangularView.h:78
unary_evaluator(const XprType &xpr)
Definition: SparseTriangularView.h:94
Definition: CoreEvaluators.h:65