10#ifndef EIGEN_SPARSEUTIL_H
11#define EIGEN_SPARSEUTIL_H
16#define EIGEN_DBG_SPARSE(X)
18#define EIGEN_DBG_SPARSE(X) X
21#define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, Op) \
22template<typename OtherDerived> \
23EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SparseMatrixBase<OtherDerived>& other) \
25 return Base::operator Op(other.derived()); \
27EIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \
29 return Base::operator Op(other); \
32#define EIGEN_SPARSE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \
33template<typename Other> \
34EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \
36 return Base::operator Op(scalar); \
39#define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \
40EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =)
43#define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \
44 EIGEN_GENERIC_PUBLIC_INTERFACE(Derived)
52template<
typename _Scalar,
int _Flags = 0,
typename _StorageIndex =
int>
class SparseMatrix;
54template<
typename _Scalar,
int _Flags = 0,
typename _StorageIndex =
int>
class SparseVector;
55template<
typename _Scalar,
int _Flags = 0,
typename _StorageIndex =
int>
class MappedSparseMatrix;
67template<
typename Lhs,
typename Rhs,
70template<
typename Lhs,
typename Rhs,
76template<
typename T,
int Rows,
int Cols,
int Flags>
struct sparse_eval;
79 :
sparse_eval<T, traits<T>::RowsAtCompileTime,traits<T>::ColsAtCompileTime,traits<T>::Flags>
82template<
typename T,
int Cols,
int Flags>
struct sparse_eval<T,1,Cols,Flags> {
89template<
typename T,
int Rows,
int Flags>
struct sparse_eval<T,Rows,1,Flags> {
97template<
typename T,
int Rows,
int Cols,
int Flags>
struct sparse_eval {
122 :
sparse_eval<T, traits<T>::RowsAtCompileTime,traits<T>::ColsAtCompileTime, evaluator<T>::Flags>
125template<
typename Decomposition,
typename RhsType>
131template<
typename Derived>
161template<typename Scalar, typename StorageIndex=typename SparseMatrix<Scalar>::StorageIndex >
167 Triplet(
const StorageIndex& i,
const StorageIndex& j,
const Scalar& v = Scalar(0))
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
Definition: Macros.h:1312
Definition: SparseUtil.h:63
Definition: SparseUtil.h:53
Sparse matrix.
Definition: MappedSparseMatrix.h:34
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
Definition: SparseUtil.h:64
Definition: SparseUtil.h:58
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:28
A versatible sparse matrix representation.
Definition: SparseMatrix.h:98
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
Definition: SparseSelfAdjointView.h:45
Definition: SparseUtil.h:61
Definition: SparseSelfAdjointView.h:601
Definition: SparseUtil.h:62
a sparse vector class
Definition: SparseVector.h:66
Expression of a dense or sparse matrix with zero or too small values removed.
Definition: SparseView.h:46
A small structure to hold a non zero as a triplet (i,j,value).
Definition: SparseUtil.h:163
StorageIndex m_row
Definition: SparseUtil.h:180
const StorageIndex & col() const
Definition: SparseUtil.h:175
Triplet()
Definition: SparseUtil.h:165
StorageIndex m_col
Definition: SparseUtil.h:180
const Scalar & value() const
Definition: SparseUtil.h:178
Triplet(const StorageIndex &i, const StorageIndex &j, const Scalar &v=Scalar(0))
Definition: SparseUtil.h:167
Scalar m_value
Definition: SparseUtil.h:181
const StorageIndex & row() const
Definition: SparseUtil.h:172
type
Definition: core.h:575
@ ColMajor
Storage order is column major (see TopicStorageOrders).
Definition: Constants.h:319
@ RowMajor
Storage order is row major (see TopicStorageOrders).
Definition: Constants.h:321
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:66
Namespace containing all symbols from the Eigen library.
Definition: MatrixExponential.h:16
const int OuterRandomAccessPattern
Definition: SparseUtil.h:49
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
const int InnerRandomAccessPattern
Definition: SparseUtil.h:48
const int RandomAccessPattern
Definition: SparseUtil.h:50
const int CoherentAccessPattern
Definition: SparseUtil.h:47
Definition: Eigen_Colamd.h:50
Definition: SparseUtil.h:68
The type used to identify a matrix expression.
Definition: Constants.h:522
Definition: Constants.h:534
Definition: SparseUtil.h:71
The type used to identify a general sparse storage.
Definition: Constants.h:510
Definition: Constants.h:537
Definition: SparseUtil.h:66
Definition: Constants.h:533
Definition: SparseUtil.h:144
bool found
Definition: SparseUtil.h:148
LowerBoundIndex(Index val, bool ok)
Definition: SparseUtil.h:146
LowerBoundIndex()
Definition: SparseUtil.h:145
Index value
Definition: SparseUtil.h:147
Definition: SparseUtil.h:138
static std::string debugName()
Definition: SparseUtil.h:138
Definition: SparseUtil.h:137
static std::string debugName()
Definition: SparseUtil.h:137
Definition: XprHelper.h:332
Definition: CoreEvaluators.h:91
SparseMatrixBase< Derived > type
Definition: SparseUtil.h:134
Definition: XprHelper.h:501
SparseSelfAdjointShape type
Definition: SparseUtil.h:140
SparseTriangularShape type
Definition: SparseUtil.h:141
Definition: XprHelper.h:685
traits< T >::Scalar _Scalar
Definition: SparseUtil.h:113
SparseMatrix< _Scalar, _Options, _StorageIndex > type
Definition: SparseUtil.h:117
traits< T >::StorageIndex _StorageIndex
Definition: SparseUtil.h:114
Definition: XprHelper.h:295
Definition: XprHelper.h:367
sparse_eval< RhsType, RhsType::RowsAtCompileTime, RhsType::ColsAtCompileTime, traits< RhsType >::Flags >::type PlainObject
Definition: SparseUtil.h:128
Matrix< _Scalar, 1, 1 > type
Definition: SparseUtil.h:108
traits< T >::Scalar _Scalar
Definition: SparseUtil.h:106
SparseVector< _Scalar, RowMajor, _StorageIndex > type
Definition: SparseUtil.h:86
traits< T >::StorageIndex _StorageIndex
Definition: SparseUtil.h:84
traits< T >::Scalar _Scalar
Definition: SparseUtil.h:83
traits< T >::Scalar _Scalar
Definition: SparseUtil.h:90
SparseVector< _Scalar, ColMajor, _StorageIndex > type
Definition: SparseUtil.h:93
traits< T >::StorageIndex _StorageIndex
Definition: SparseUtil.h:91
Definition: SparseUtil.h:97
traits< T >::StorageIndex _StorageIndex
Definition: SparseUtil.h:99
traits< T >::Scalar _Scalar
Definition: SparseUtil.h:98
@ _Options
Definition: SparseUtil.h:100
SparseMatrix< _Scalar, _Options, _StorageIndex > type
Definition: SparseUtil.h:102
Definition: ForwardDeclarations.h:17