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) \ 22 template<typename OtherDerived> \ 23 EIGEN_STRONG_INLINE Derived& operator Op(const Eigen::SparseMatrixBase<OtherDerived>& other) \ 25 return Base::operator Op(other.derived()); \ 27 EIGEN_STRONG_INLINE Derived& operator Op(const Derived& other) \ 29 return Base::operator Op(other); \ 32 #define EIGEN_SPARSE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, Op) \ 33 template<typename Other> \ 34 EIGEN_STRONG_INLINE Derived& operator Op(const Other& scalar) \ 36 return Base::operator Op(scalar); \ 39 #define EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATORS(Derived) \ 40 EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, =) 43 #define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \ 44 EIGEN_GENERIC_PUBLIC_INTERFACE(Derived) 47 const int CoherentAccessPattern = 0x1;
48 const int InnerRandomAccessPattern = 0x2 | CoherentAccessPattern;
49 const int OuterRandomAccessPattern = 0x4 | CoherentAccessPattern;
50 const int RandomAccessPattern = 0x8 | OuterRandomAccessPattern | InnerRandomAccessPattern;
52 template<
typename _Scalar,
int _Flags = 0,
typename _StorageIndex =
int>
class SparseMatrix;
54 template<
typename _Scalar,
int _Flags = 0,
typename _StorageIndex =
int>
class SparseVector;
55 template<
typename _Scalar,
int _Flags = 0,
typename _StorageIndex =
int>
class MappedSparseMatrix;
59 template<
typename MatrixType>
class SparseView;
67 template<
typename Lhs,
typename Rhs,
70 template<
typename Lhs,
typename Rhs,
76 template<
typename T,
int Rows,
int Cols,
int Flags>
struct sparse_eval;
79 :
sparse_eval<T, traits<T>::RowsAtCompileTime,traits<T>::ColsAtCompileTime,traits<T>::Flags>
82 template<
typename T,
int Cols,
int Flags>
struct sparse_eval<
T,1,Cols,Flags> {
89 template<
typename T,
int Rows,
int Flags>
struct sparse_eval<
T,Rows,1,Flags> {
97 template<
typename T,
int Rows,
int Cols,
int Flags>
struct sparse_eval {
122 :
sparse_eval<T, traits<T>::RowsAtCompileTime,traits<T>::ColsAtCompileTime, evaluator<T>::Flags>
125 template<
typename Decomposition,
typename RhsType>
131 template<
typename Derived>
153 template<typename Scalar, typename StorageIndex=typename SparseMatrix<Scalar>::StorageIndex >
157 Triplet() : m_row(0), m_col(0), m_value(0) {}
159 Triplet(
const StorageIndex& i,
const StorageIndex& j,
const Scalar& v = Scalar(0))
160 : m_row(i), m_col(j), m_value(v)
164 const StorageIndex&
row()
const {
return m_row; }
167 const StorageIndex&
col()
const {
return m_col; }
170 const Scalar&
value()
const {
return m_value; }
172 StorageIndex m_row, m_col;
178 #endif // EIGEN_SPARSEUTIL_H const StorageIndex & col() const
Definition: SparseUtil.h:167
Definition: XprHelper.h:347
Storage order is column major (see TopicStorageOrders).
Definition: Constants.h:320
Definition: SparseUtil.h:61
A versatible sparse matrix representation.
Definition: SparseMatrix.h:92
Definition: SparseSelfAdjointView.h:566
Definition: SparseUtil.h:76
Definition: XprHelper.h:275
const StorageIndex & row() const
Definition: SparseUtil.h:164
Definition: CoreEvaluators.h:90
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
Definition: SparseSelfAdjointView.h:43
Definition: Constants.h:521
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:61
The type used to identify a matrix expression.
Definition: Constants.h:506
Base class of any sparse matrices or sparse expressions.
Definition: ForwardDeclarations.h:281
Definition: SparseUtil.h:64
Definition: Constants.h:518
a sparse vector class
Definition: SparseUtil.h:54
Definition: SparseUtil.h:68
Definition: ForwardDeclarations.h:126
A sparse matrix class designed for matrix assembly purpose.
Definition: SparseUtil.h:53
The type used to identify a general sparse storage.
Definition: Constants.h:494
Definition: SparseUtil.h:137
Definition: XprHelper.h:648
Definition: SparseUtil.h:62
Definition: SparseUtil.h:138
Definition: BandTriangularSolver.h:13
Definition: SparseUtil.h:63
const Scalar & value() const
Definition: SparseUtil.h:170
Definition: SparseUtil.h:58
Storage order is row major (see TopicStorageOrders).
Definition: Constants.h:322
Definition: SparseUtil.h:66
Definition: Constants.h:517
Definition: SparseUtil.h:71
Definition: XprHelper.h:481
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:178
Sparse matrix.
Definition: MappedSparseMatrix.h:32
Definition: ForwardDeclarations.h:17
Definition: XprHelper.h:312