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) 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>
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 >
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; }
178 #endif // EIGEN_SPARSEUTIL_H const int OuterRandomAccessPattern
traits< T >::Scalar _Scalar
A versatible sparse matrix representation.
SparseSelfAdjointShape type
const StorageIndex & row() const
const int InnerRandomAccessPattern
SparseMatrix< _Scalar, _Options, _StorageIndex > type
static std::string debugName()
traits< T >::Scalar _Scalar
Namespace containing all symbols from the Eigen library.
traits< T >::StorageIndex _StorageIndex
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix.
Matrix< _Scalar, 1, 1 > type
traits< T >::Scalar _Scalar
const unsigned int RowMajorBit
#define EIGEN_SIZE_MIN_PREFER_FIXED(a, b)
SparseMatrix< _Scalar, _Options, _StorageIndex > type
traits< T >::StorageIndex _StorageIndex
traits< T >::StorageIndex _StorageIndex
const StorageIndex & col() const
traits< T >::Scalar _Scalar
Base class of any sparse matrices or sparse expressions.
static std::string debugName()
sparse_eval< RhsType, RhsType::RowsAtCompileTime, RhsType::ColsAtCompileTime, traits< RhsType >::Flags >::type PlainObject
traits< T >::StorageIndex _StorageIndex
Expression of a dense or sparse matrix with zero or too small values removed.
A sparse matrix class designed for matrix assembly purpose.
SparseVector< _Scalar, ColMajor, _StorageIndex > type
const int RandomAccessPattern
const Scalar & value() const
SparseMatrixBase< Derived > type
const int CoherentAccessPattern
traits< T >::Scalar _Scalar
The matrix class, also used for vectors and row-vectors.
SparseTriangularShape type
SparseVector< _Scalar, RowMajor, _StorageIndex > type
Triplet(const StorageIndex &i, const StorageIndex &j, const Scalar &v=Scalar(0))