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, =) \    41 EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, +=) \    42 EIGEN_SPARSE_INHERIT_ASSIGNMENT_OPERATOR(Derived, -=) \    43 EIGEN_SPARSE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, *=) \    44 EIGEN_SPARSE_INHERIT_SCALAR_ASSIGNMENT_OPERATOR(Derived, /=)    46 #define _EIGEN_SPARSE_PUBLIC_INTERFACE(Derived, BaseClass) \    47   typedef BaseClass Base; \    48   typedef typename Eigen::internal::traits<Derived >::Scalar Scalar; \    49   typedef typename Eigen::NumTraits<Scalar>::Real RealScalar; \    50   typedef typename Eigen::internal::nested<Derived >::type Nested; \    51   typedef typename Eigen::internal::traits<Derived >::StorageKind StorageKind; \    52   typedef typename Eigen::internal::traits<Derived >::Index Index; \    53   enum { RowsAtCompileTime = Eigen::internal::traits<Derived >::RowsAtCompileTime, \    54         ColsAtCompileTime = Eigen::internal::traits<Derived >::ColsAtCompileTime, \    55         Flags = Eigen::internal::traits<Derived >::Flags, \    56         CoeffReadCost = Eigen::internal::traits<Derived >::CoeffReadCost, \    57         SizeAtCompileTime = Base::SizeAtCompileTime, \    58         IsVectorAtCompileTime = Base::IsVectorAtCompileTime }; \    59   using Base::derived; \    60   using Base::const_cast_derived;    62 #define EIGEN_SPARSE_PUBLIC_INTERFACE(Derived) \    63   _EIGEN_SPARSE_PUBLIC_INTERFACE(Derived, Eigen::SparseMatrixBase<Derived >)    71 template<
typename _Scalar, 
int _Flags = 0, 
typename _Index = 
int>  
class SparseMatrix;
    73 template<
typename _Scalar, 
int _Flags = 0, 
typename _Index = 
int>  
class SparseVector;
    74 template<
typename _Scalar, 
int _Flags = 0, 
typename _Index = 
int>  
class MappedSparseMatrix;
    79 template<
typename MatrixType> 
class SparseView;
    95 template<
typename T> 
struct eval<T,Sparse>
    96   : 
public sparse_eval<T, traits<T>::RowsAtCompileTime,traits<T>::ColsAtCompileTime>
   113 template<
typename T,
int Rows,
int Cols> 
struct sparse_eval {
   146 template<
typename Scalar, 
typename Index=
unsigned int>
   152   Triplet(
const Index& i, 
const Index& j, 
const Scalar& v = Scalar(0))
   153     : m_row(i), m_col(j), m_value(v)
   157   const Index& 
row()
 const { 
return m_row; }
   160   const Index& 
col()
 const { 
return m_col; }
   163   const Scalar& 
value()
 const { 
return m_value; }
   171 #endif // EIGEN_SPARSEUTIL_H 
const int OuterRandomAccessPattern
traits< T >::Index _Index
traits< T >::Scalar _Scalar
A versatible sparse matrix representation. 
const int InnerRandomAccessPattern
traits< T >::Scalar _Scalar
Triplet(const Index &i, const Index &j, const Scalar &v=Scalar(0))
SparseVector< _Scalar, ColMajor, _Index > type
Pseudo expression to manipulate a triangular sparse matrix as a selfadjoint matrix. 
const unsigned int RowMajorBit
const Index & col() const 
SparseMatrix< _Scalar, _Options, _Index > type
Base class of any sparse matrices or sparse expressions. 
traits< T >::Index _Index
const int RandomAccessPattern
A small structure to hold a non zero as a triplet (i,j,value). 
traits< T >::Scalar _Scalar
SparseMatrix< _Scalar, _Options, _Index > type
const int CoherentAccessPattern
traits< T >::Scalar _Scalar
traits< T >::Scalar _Scalar
Matrix< _Scalar, 1, 1 > type
SparseVector< _Scalar, RowMajor, _Index > type
The matrix class, also used for vectors and row-vectors. 
traits< T >::Index _Index
traits< T >::Index _Index
const Index & row() const 
const Scalar & value() const