10 #ifndef EIGEN_SPARSEUTIL_H
11 #define EIGEN_SPARSEUTIL_H
19 #define EIGEN_DBG_SPARSE(X)
21 #define EIGEN_DBG_SPARSE(X) X
24 #define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
25 template <typename OtherDerived> \
26 EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SparseMatrixBase<OtherDerived>& other) { \
27 return Base::operator Op(other.derived()); \
29 EIGEN_STRONG_INLINE Derived& operator Op(const Derived & other) { return Base::operator Op(other); }
31 #define EIGEN_SPARSE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
32 template <typename Other> \
33 EIGEN_STRONG_INLINE Derived& operator Op(const Other & scalar) { \
34 return Base::operator Op(scalar); \
37 #define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATORS(Derived) EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =)
39 #define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
46 template <
typename Scalar_,
int Flags_ = 0,
typename StorageIndex_ =
int>
48 template <
typename Scalar_,
int Flags_ = 0,
typename StorageIndex_ =
int>
51 template <
typename MatrixType,
unsigned int UpLo>
53 template <
typename Lhs,
typename Rhs>
55 template <
typename MatrixType>
58 template <
typename Lhs,
typename Rhs>
60 template <
typename Lhs,
typename Rhs>
62 template <
typename Lhs,
typename Rhs>
64 template <
typename Lhs,
typename Rhs,
bool Transpose>
67 template <
typename Lhs,
typename Rhs>
69 template <
typename Lhs,
typename Rhs,
74 template <
typename Lhs,
typename Rhs,
78 template <
typename MatrixType,
int UpLo>
83 template <
typename T,
int Rows,
int Cols,
int Flags>
87 struct eval<
T,
Sparse> :
sparse_eval<T, traits<T>::RowsAtCompileTime, traits<T>::ColsAtCompileTime, traits<T>::Flags> {
90 template <
typename T,
int Cols,
int Flags>
99 template <
typename T,
int Rows,
int Flags>
109 template <
typename T,
int Rows,
int Cols,
int Flags>
119 template <
typename T,
int Flags>
127 template <
typename T>
137 template <
typename T>
139 :
sparse_eval<T, traits<T>::RowsAtCompileTime, traits<T>::ColsAtCompileTime, evaluator<T>::Flags> {};
141 template <
typename Decomposition,
typename RhsType>
143 typedef typename sparse_eval<RhsType, RhsType::RowsAtCompileTime, RhsType::ColsAtCompileTime,
147 template <
typename Derived>
186 template <typename Scalar, typename StorageIndex = typename SparseMatrix<Scalar>::StorageIndex>
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
SCALAR Scalar
Definition: bench_gemm.cpp:45
Definition: SparseUtil.h:63
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Definition: SparseUtil.h:65
Definition: SparseUtil.h:54
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:30
A versatible sparse matrix representation.
Definition: SparseMatrix.h:121
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
Definition: SparseSelfAdjointView.h:52
Definition: SparseUtil.h:59
Definition: SparseSelfAdjointView.h:556
Definition: SparseUtil.h:61
a sparse vector class
Definition: SparseVector.h:62
Expression of a dense or sparse matrix with zero or too small values removed.
Definition: SparseView.h:45
const Scalar & value() const
Definition: SparseUtil.h:200
StorageIndex m_row
Definition: SparseUtil.h:203
const StorageIndex & col() const
Definition: SparseUtil.h:197
Triplet()
Definition: SparseUtil.h:189
StorageIndex m_col
Definition: SparseUtil.h:203
Triplet(const StorageIndex &i, const StorageIndex &j, const Scalar &v=Scalar(0))
Definition: SparseUtil.h:191
Scalar m_value
Definition: SparseUtil.h:204
const StorageIndex & row() const
Definition: SparseUtil.h:194
@ ColMajor
Definition: Constants.h:318
@ RowMajor
Definition: Constants.h:320
const unsigned int RowMajorBit
Definition: Constants.h:70
@ Lhs
Definition: TensorContractionMapper.h:20
@ Rhs
Definition: TensorContractionMapper.h:20
constexpr int min_size_prefer_fixed(A a, B b)
Definition: Meta.h:683
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
const int OuterRandomAccessPattern
Definition: SparseUtil.h:43
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
const int InnerRandomAccessPattern
Definition: SparseUtil.h:42
const int RandomAccessPattern
Definition: SparseUtil.h:44
const int CoherentAccessPattern
Definition: SparseUtil.h:41
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56
val
Definition: calibrate.py:119
type
Definition: compute_granudrum_aor.py:141
Definition: Eigen_Colamd.h:49
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
Definition: SparseUtil.h:72
Definition: Constants.h:534
Definition: Constants.h:561
Definition: SparseUtil.h:77
Definition: Constants.h:570
Definition: SparseUtil.h:68
Definition: Constants.h:522
Definition: Constants.h:558
Definition: SparseUtil.h:169
bool found
Definition: SparseUtil.h:173
LowerBoundIndex(Index val, bool ok)
Definition: SparseUtil.h:171
LowerBoundIndex()
Definition: SparseUtil.h:170
Index value
Definition: SparseUtil.h:172
Definition: SparseUtil.h:155
static std::string debugName()
Definition: SparseUtil.h:156
Definition: SparseUtil.h:152
static std::string debugName()
Definition: SparseUtil.h:153
Definition: XprHelper.h:427
Definition: CoreEvaluators.h:104
SparseMatrixBase< Derived > type
Definition: SparseUtil.h:149
Definition: XprHelper.h:575
SparseSelfAdjointShape type
Definition: SparseUtil.h:161
SparseTriangularShape type
Definition: SparseUtil.h:165
Definition: XprHelper.h:854
traits< T >::StorageIndex StorageIndex_
Definition: SparseUtil.h:130
traits< T >::Scalar Scalar_
Definition: SparseUtil.h:129
SparseMatrix< Scalar_, Options_, StorageIndex_ > type
Definition: SparseUtil.h:134
Definition: XprHelper.h:389
Definition: XprHelper.h:465
sparse_eval< RhsType, RhsType::RowsAtCompileTime, RhsType::ColsAtCompileTime, traits< RhsType >::Flags >::type PlainObject
Definition: SparseUtil.h:144
traits< T >::Scalar Scalar_
Definition: SparseUtil.h:121
Matrix< Scalar_, 1, 1 > type
Definition: SparseUtil.h:124
traits< T >::StorageIndex StorageIndex_
Definition: SparseUtil.h:93
SparseVector< Scalar_, RowMajor, StorageIndex_ > type
Definition: SparseUtil.h:96
traits< T >::Scalar Scalar_
Definition: SparseUtil.h:92
SparseVector< Scalar_, ColMajor, StorageIndex_ > type
Definition: SparseUtil.h:105
traits< T >::StorageIndex StorageIndex_
Definition: SparseUtil.h:102
traits< T >::Scalar Scalar_
Definition: SparseUtil.h:101
Definition: SparseUtil.h:110
SparseMatrix< Scalar_, Options_, StorageIndex_ > type
Definition: SparseUtil.h:116
@ Options_
Definition: SparseUtil.h:113
traits< T >::Scalar Scalar_
Definition: SparseUtil.h:111
traits< T >::StorageIndex StorageIndex_
Definition: SparseUtil.h:112
Definition: ForwardDeclarations.h:21
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2